This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/5] libdwfl: don't bother freeing frames outside of dwfl_thread_getframes


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.

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]