mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-27 22:00:42 +00:00
perf tools: Fix memory leak on error
cppcheck reported: [util/event.c:480]: (error) Memory leak: event Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Link: http://lkml.kernel.org/r/2717013.8dV0naNhAV@storm Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
8eb44dd76a
commit
0b9e01a4f0
@ -476,8 +476,10 @@ int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
|
||||
}
|
||||
}
|
||||
|
||||
if (kallsyms__parse(filename, &args, find_symbol_cb) <= 0)
|
||||
if (kallsyms__parse(filename, &args, find_symbol_cb) <= 0) {
|
||||
free(event);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
map = machine->vmlinux_maps[MAP__FUNCTION];
|
||||
size = snprintf(event->mmap.filename, sizeof(event->mmap.filename),
|
||||
|
Loading…
Reference in New Issue
Block a user