libdwfl: Fix memory leak in __libdwfl_open_by_build_id.
authorMark Wielaard <mjw@redhat.com>
Mon, 1 Jun 2015 15:07:26 +0000 (17:07 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 5 Jun 2015 12:52:29 +0000 (14:52 +0200)
commit8aaf4fc46f5b0b1ed2b567734d06875a39047dd9
tree36d62601054f50e8a10da849adc1e5215fc41353
parentf17a9bbc2963854090b81fdf58e49dc8dc6ccfba
libdwfl: Fix memory leak in __libdwfl_open_by_build_id.

commit c57829 introduced a memory leak by passing the path string to
strsep. strsep will change the given pointer and set it to NULL eventually.
Causing the original pointer to leak. Fix by passing a copy of the pointer
to strsep.

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