perf tools: Free the terms list_head in parse_events__free_terms()
authorWang Nan <[email protected]>
Fri, 12 Feb 2016 20:01:17 +0000 (17:01 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 12 Feb 2016 20:01:17 +0000 (17:01 -0300)
Fixing a leak, since code calling parse_events__free_terms() expect it
to free the list_head too.

Signed-off-by: Wang Nan <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: He Kuang <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: [email protected]
[ Spun off from another patch ]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/parse-events.c

index 668afdccfccaff5f33011b24a44f2d82b5dcef59..d1b49ec7ae46427efb95b8c3834c4182803f108a 100644 (file)
@@ -2081,6 +2081,7 @@ void parse_events_terms__purge(struct list_head *terms)
 void parse_events__free_terms(struct list_head *terms)
 {
        parse_events_terms__purge(terms);
+       free(terms);
 }
 
 void parse_events_evlist_error(struct parse_events_evlist *data,