[PATCH 1/5] libdwfl: don't bother freeing frames outside of dwfl_thread_getframes
Tue Oct 29 16:52:00 GMT 2019
On Tue, 2019-10-29 at 09:17 -0700, Omar Sandoval wrote:
> Unless I missed something, the only place we allocate the state is
> from dwfl_thread_getframes, and we always free it before returning from
> that function. So if you're not using dwfl_thread_getframes, dwfl_getthreads
> won't have anything to free, and if you are, dwfl_thread_getframes
> already freed it. Or am I missing something?
O, you are right. Sorry, I missed that. Now that I understand what is
going on it actually is odd that the other functions try to free the
state. They cannot know whether that is what their caller wants. So
yes, this makes sense. Added that extra sentence to the commit message
and pushed to master.
More information about the Elfutils-devel