lkml.org 
[lkml]   [2020]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] libperf evlist: fix memory leaks
On Wed, Mar 18, 2020 at 07:31:01PM -0700, Ian Rogers wrote:
> Memory leaks found by applying LLVM's libfuzzer on the tools/perf
> parse_events function.
>
> Signed-off-by: Ian Rogers <irogers@google.com>

Arnaldo,
could you plz pull first:
https://lore.kernel.org/lkml/1583665157-349023-1-git-send-email-zhe.he@windriver.com/

and then merge in this one?

thanks,
jirka

Acked-by: Jiri Olsa <jolsa@redhat.com>

> ---
> tools/lib/perf/evlist.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
> index 5b9f2ca50591..6485d1438f75 100644
> --- a/tools/lib/perf/evlist.c
> +++ b/tools/lib/perf/evlist.c
> @@ -125,8 +125,10 @@ static void perf_evlist__purge(struct perf_evlist *evlist)
> void perf_evlist__exit(struct perf_evlist *evlist)
> {
> perf_cpu_map__put(evlist->cpus);
> + perf_cpu_map__put(evlist->all_cpus);
> perf_thread_map__put(evlist->threads);
> evlist->cpus = NULL;
> + evlist->all_cpus = NULL;
> evlist->threads = NULL;
> fdarray__exit(&evlist->pollfd);
> }
> --
> 2.25.1.696.g5e7596f4ac-goog
>

\
 
 \ /
  Last update: 2020-03-23 12:02    [W:0.127 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site