lkml.org 
[lkml]   [2021]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] objtool: prevent memory leak in error paths
Em Thu, Apr 15, 2021 at 09:24:41AM +0200, Peter Zijlstra escreveu:
> On Wed, Apr 14, 2021 at 11:47:09AM +0300, Dan Carpenter wrote:
> > On Wed, Apr 14, 2021 at 01:45:11AM +0500, Muhammad Usama Anjum wrote:
> > > Memory allocated by sym and sym->name isn't being freed if some error
> > > occurs in elf_create_undef_symbol(). Free the sym and sym->name if error
> > > is detected before returning NULL.
> > >
> > > Addresses-Coverity: ("Prevent memory leak")
> > > Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
> > > Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
> > > ---
> > > Only build has been tested.
> > >
> >
> > Just ignore leaks from the tools/ directory. These things run and then
> > exit and all the memory is freed. #OldSchoolGarbageCollector
>
> Mostly true; but I suspect tools/perf might care, it has some longer
> running things in.

Yes, and now we have 'perf daemon' that is long running.

- Arnaldo

\
 
 \ /
  Last update: 2021-04-19 19:16    [W:0.049 / U:3.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site