projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8eb44dd
)
perf tools: Fix memory leak on error
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Fri, 25 Jan 2013 10:20:47 +0000
(11:20 +0100)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 30 Jan 2013 13:40:05 +0000
(10:40 -0300)
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>
tools/perf/util/event.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/event.c
b/tools/perf/util/event.c
index
3cf2c3e
..
5cd13d7
100644
(file)
--- a/
tools/perf/util/event.c
+++ b/
tools/perf/util/event.c
@@
-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),