diff options
author | David Ahern <dsahern@gmail.com> | 2013-07-02 21:27:23 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-07-12 18:46:14 +0200 |
commit | 0142dab01cd690f6e376f1fb4d4462beb054dfaf (patch) | |
tree | 28dfd164e1b81478e81c9b9fcc06769c708842d2 /tools/perf/util/parse-events.c | |
parent | perf evlist: Fix use of uninitialized variable (diff) | |
download | linux-0142dab01cd690f6e376f1fb4d4462beb054dfaf.tar.xz linux-0142dab01cd690f6e376f1fb4d4462beb054dfaf.zip |
perf tools: Don't free list head in parse_events__free_terms
Function should only be freeing the entries in the list in case of
failure, as those were allocated there, not the list_head itself.
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1372793245-4136-5-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index ef72e98a07a6..bcf83ee97e92 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1260,6 +1260,4 @@ void parse_events__free_terms(struct list_head *terms) list_for_each_entry_safe(term, h, terms, list) free(term); - - free(terms); } |