]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl: Fix memory leak in linux-core-attach. Allow reiterating threads.
authorMark Wielaard <mjw@redhat.com>
Tue, 24 Dec 2013 09:37:58 +0000 (10:37 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 31 Dec 2013 12:58:32 +0000 (13:58 +0100)
commit05a4412f11e9f48c8a67c48cd2fc71684873bb63
tree4bbf1f0f691e5906a3071a5d7c5c4ef4e4baf80f
parentb20ca0bd7fba0743fa97df2d42f6fd3c7b206039
libdwfl: Fix memory leak in linux-core-attach. Allow reiterating threads.

core_next_thread would allocate a new thread_arg each time but never free
it. We only need one active thread_arg to keep the state. Free it when
there are no more threads. It was also not possible to start walking all
threads in the core again. Just reset the note offset at the start.

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