]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Fix dwarf_getscopes memory leak on error
authorMark Wielaard <mark@klomp.org>
Wed, 22 Feb 2023 22:34:00 +0000 (23:34 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 28 Feb 2023 11:35:15 +0000 (12:35 +0100)
commite24d8a4a3ea106608bb3e8d33c4639cf71d0f08d
tree47de840bd6ec8ec60bb2d828f2756d83d6354d04
parent4961f9ae2f11795022166698aa15a15f48ec8c5b
libdw: Fix dwarf_getscopes memory leak on error

When there is an error in dwarf_getscopes after the initial scopes
have been allocated, e.g. when looking for the inlined scopes, then
the scopes would leak. Fix this by explicitly free the scopes on error.

https://sourceware.org/bugzilla/show_bug.cgi?id=29434

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_getscopes.c