diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2016-08-01 21:49:13 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-08-01 21:49:13 +0000 |
| commit | c17c17e8c26a5d44b3a8a6ef8c55233d72eed6c0 (patch) | |
| tree | e41f5b657afcb37c03e1ee03873d30b3d130786b /tools/lib/bitmap.c | |
| parent | perf annotate: Introduce strerror for handling symbol__disassemble() errors (diff) | |
| download | kernel-c17c17e8c26a5d44b3a8a6ef8c55233d72eed6c0.tar.gz kernel-c17c17e8c26a5d44b3a8a6ef8c55233d72eed6c0.zip | |
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/lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions
