]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Not leak memory on error in dwarf_getpubnames.
authorMark Wielaard <mjw@redhat.com>
Thu, 18 Jun 2015 08:41:42 +0000 (10:41 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 19 Jun 2015 10:23:55 +0000 (12:23 +0200)
commit65e58829fa0b6359735625e27309ae5eec7d810e
tree7a58c2240895158b6735915b99c672260546752e
parent1dcbe0c59a72eb1c6908ebce5209683769526349
libdw: Not leak memory on error in dwarf_getpubnames.

When there is an error with the first entry we might already have allocated
the memory but not yet set cnt to 1. Just always free the memory on error.
free (NULL) is a nop anyway and doesn't matter on a failure path.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdw/ChangeLog
libdw/dwarf_getpubnames.c