diff options
author | Jiri Olsa <jolsa@kernel.org> | 2020-07-19 20:13:02 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-30 07:01:49 -0300 |
commit | 60e10c0037d0159f886c8592b761ee31ab3b7e21 (patch) | |
tree | 9015b9607cf8f4e6f002456bff042faf371f2fa2 /tools/perf/util/expr.y | |
parent | 1b98c6e3ba8be09a2f988dc4b80de9b4b029b93f (diff) | |
download | linux-60e10c0037d0159f886c8592b761ee31ab3b7e21.tar.gz linux-60e10c0037d0159f886c8592b761ee31ab3b7e21.tar.bz2 linux-60e10c0037d0159f886c8592b761ee31ab3b7e21.zip |
perf metric: Fix memory leak in expr__add_id function
Arnaldo found that we don't release value data in case the hashmap__set
fails. Releasing it in case of an error.
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200719181320.785305-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/expr.y')
0 files changed, 0 insertions, 0 deletions