diff options
| author | Sanskriti Sharma <[email protected]> | 2018-10-02 14:29:13 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-10-08 17:23:46 +0000 |
| commit | 470c8f7c88de013d266e1b61044efe8937728b7f (patch) | |
| tree | 2024fe6a048c02880d7b7eb058698ae202f22d7a /arch/powerpc/lib/code-patching.c | |
| parent | perf tools: Free 'printk' string in parse_ftrace_printk() (diff) | |
| download | kernel-470c8f7c88de013d266e1b61044efe8937728b7f.tar.gz kernel-470c8f7c88de013d266e1b61044efe8937728b7f.zip | |
perf tools: Avoid double free in read_event_file()
The temporary 'buf' buffer allocated in read_event_file() may be freed
twice. Move the free() call to the common function exit point.
Fixes the following coverity complaints:
Error: USE_AFTER_FREE (CWE-825):
tools/perf/util/trace-event-read.c:309: double_free: Calling "free"
frees pointer "buf" which has already been freed.
Signed-off-by: Sanskriti Sharma <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Cc: Joe Lawrence <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions
