summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2013-07-04 16:20:24 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-07-08 17:45:56 -0300
commit4be8be6b430611def94bcd583b7b302d197a9520 (patch)
treed20c11e8fac372d2bf39d7c975600f290cf0dd63 /tools
parentb2c34fde048f3c85ef0716a8cdabbe46ac67d1e6 (diff)
downloadop-kernel-dev-4be8be6b430611def94bcd583b7b302d197a9520.zip
op-kernel-dev-4be8be6b430611def94bcd583b7b302d197a9520.tar.gz
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.hunter@intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1372944040-32690-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-events.c1
1 files changed, 1 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud