Commit-ID: 4be8be6b430611def94bcd583b7b302d197a9520 Gitweb: http://git.kernel.org/tip/4be8be6b430611def94bcd583b7b302d197a9520 Author: Adrian Hunter <adrian.hun...@intel.com> AuthorDate: Thu, 4 Jul 2013 16:20:24 +0300 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate: Mon, 8 Jul 2013 17:45:56 -0300
perf tools: Fix new_term() missing free on error path On the error path, newly allocated 'term' must be freed. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Acked-by: Jiri Olsa <jo...@redhat.com> Cc: David Ahern <dsah...@gmail.com> Cc: Frederic Weisbecker <fweis...@gmail.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Jiri Olsa <jo...@redhat.com> Cc: Mike Galbraith <efa...@gmx.de> Cc: Namhyung Kim <namhy...@gmail.com> Cc: Paul Mackerras <pau...@samba.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Stephane Eranian <eran...@google.com> Link: http://lkml.kernel.org/r/1372944040-32690-6-git-send-email-adrian.hun...@intel.com Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index d8dcb8d..995fc25 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1184,6 +1184,7 @@ static int new_term(struct parse_events_term **_term, int type_val, term->val.str = str; break; default: + free(term); return -EINVAL; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/