diff options
author | Namhyung Kim <namhyung@kernel.org> | 2021-03-01 15:04:07 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-03-06 20:54:29 +0100 |
commit | 641b6250337027311a09009e18264bb65c4d521c (patch) | |
tree | dc993bdcc6c4ef40c4bf5cd35963d8ffe4e77183 /drivers/scsi/atp870u.c | |
parent | perf test: Fix a thread map leak in thread_map_synthesize test (diff) | |
download | linux-641b6250337027311a09009e18264bb65c4d521c.tar.xz linux-641b6250337027311a09009e18264bb65c4d521c.zip |
perf test: Fix a memory leak in thread_map_remove test
The str should be freed after creating a thread map. Also change the
open-coded thread map deletion to a call to perf_thread_map__put().
$ perf test -v 44
44: Remove thread map :
--- start ---
test child forked, pid 165536
2 threads: 165535, 165536
1 thread: 165536
0 thread:
=================================================================
==165536==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 14 byte(s) in 1 object(s) allocated from:
#0 0x7f54453ffe8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f5444f8c6a7 in __vasprintf_internal libio/vasprintf.c:71
SUMMARY: AddressSanitizer: 14 byte(s) leaked in 1 allocation(s).
test child finished with 1
---- end ----
Remove thread map: FAILED!
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20210301140409.184570-10-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/scsi/atp870u.c')
0 files changed, 0 insertions, 0 deletions