diff options
| author | Riccardo Mancini <[email protected]> | 2021-07-15 16:07:20 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-07-15 20:34:07 +0000 |
| commit | 6c7f0ab04707c2882f08d5abb9dc41b54493b61c (patch) | |
| tree | c41e2446cd3b2e75ef49d91aef6252a88b0ae432 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | perf lzma: Close lzma stream on exit (diff) | |
| download | kernel-6c7f0ab04707c2882f08d5abb9dc41b54493b61c.tar.gz kernel-6c7f0ab04707c2882f08d5abb9dc41b54493b61c.zip | |
perf trace: Free malloc'd trace fields on exit
ASan reports several memory leaks running:
# perf test "88: Check open filename arg using perf trace + vfs_getname"
The first of these leaks is related to struct trace fields never being
deallocated.
This patch adds the function trace__exit, which is called at the end of
cmd_trace, replacing the existing deallocation, which is now moved
inside the new function.
This function deallocates:
- ev_qualifier
- ev_qualifier_ids.entries
- syscalls.table
- sctbl
- perfconfig_events
Signed-off-by: Riccardo Mancini <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/de5945ed5c0cb882cbfa3268567d0bff460ff016.1626343282.git.rickyman7@gmail.com
[ Removed needless initialization to zero, missing named initializers are zeroed by the compiler ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions
