aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/perl/Perf-Trace-Util
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2016-08-01 18:49:13 -0300
committerArnaldo Carvalho de Melo <[email protected]>2016-08-01 18:49:13 -0300
commitc17c17e8c26a5d44b3a8a6ef8c55233d72eed6c0 (patch)
treee41f5b657afcb37c03e1ee03873d30b3d130786b /tools/perf/scripts/perl/Perf-Trace-Util
parentee51d851392e1fe3e8be30b3c5847f34da343424 (diff)
perf annotate: Plug filename string leak
If dso__build_id_filename(..., NULL, ...) returns !NULL its because it allocated it, so, when reaching the 'if (dso__is_kcore()) test, we already checked that and were just "fallbacking" to using dso->long_name, but without freeing filename, thus leaking it. Fix it by adding the dso__is_kcore() test to the 'or' group just after it, the one containing the full fallback code, including freeing the filename. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Fixes: ee205503f233 ("perf tools: Fix annotation with kcore") Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/perl/Perf-Trace-Util')
0 files changed, 0 insertions, 0 deletions