lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191220214737.GB3582@redhat.com>
Date:   Fri, 20 Dec 2019 18:47:37 -0300
From:   Arnaldo Carvalho de Melo <acme@...hat.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Hewenliang <hewenliang4@...wei.com>, tstoyanov@...are.com,
        linux-kernel@...r.kernel.org, linfeilong@...wei.com
Subject: Re: [PATCH] tools lib traceevent: Fix memory leakage in filter_event

Em Thu, Dec 19, 2019 at 08:56:31PM -0500, Steven Rostedt escreveu:
> On Mon, 9 Dec 2019 01:35:49 -0500
> Hewenliang <hewenliang4@...wei.com> wrote:
> 
> > It is necessary to call free_arg(arg) when add_filter_type returns NULL in
> > the function of filter_event.
> > 
> > Signed-off-by: Hewenliang <hewenliang4@...wei.com>
> 
> This looks fine.
> 
> Reviewed-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> 
> Arnaldo, care to take this?

Sure, just landed in  acme/perf/urgent :)

- Arnaldo
 
> -- Steve
> 
> > ---
> >  tools/lib/traceevent/parse-filter.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c
> > index f3cbf86e51ac..20eed719542e 100644
> > --- a/tools/lib/traceevent/parse-filter.c
> > +++ b/tools/lib/traceevent/parse-filter.c
> > @@ -1228,8 +1228,10 @@ filter_event(struct tep_event_filter *filter, struct tep_event *event,
> >  	}
> >  
> >  	filter_type = add_filter_type(filter, event->id);
> > -	if (filter_type == NULL)
> > +	if (filter_type == NULL) {
> > +		free_arg(arg);
> >  		return TEP_ERRNO__MEM_ALLOC_FAILED;
> > +	}
> >  
> >  	if (filter_type->filter)
> >  		free_arg(filter_type->filter);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ