projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aaf5a5
)
perf probe: Fix get_real_path to free allocated memory in error path
author
Masami Hiramatsu
<
[email protected]
>
Thu, 26 Feb 2015 08:25:04 +0000
(17:25 +0900)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Thu, 26 Feb 2015 14:59:05 +0000
(11:59 -0300)
Fix get_real_path to free allocated memory when comp_dir is used for
complementing path and getting an error.
Signed-off-by: Masami Hiramatsu <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Cc: Naohiro Aota <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/probe-event.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/probe-event.c
b/tools/perf/util/probe-event.c
index 662d454cb667afb545305ca4b3b5b7c0208ad7ac..4a93bf433344d60cf2dc3f7b34e2b12cf3a1befb 100644
(file)
--- a/
tools/perf/util/probe-event.c
+++ b/
tools/perf/util/probe-event.c
@@
-549,9
+549,11
@@
static int get_real_path(const char *raw_path, const char *comp_dir,
if (access(*new_path, R_OK) == 0)
return 0;
- if (!symbol_conf.source_prefix)
+ if (!symbol_conf.source_prefix)
{
/* In case of searching comp_dir, don't retry */
+ zfree(new_path);
return -errno;
+ }
switch (errno) {
case ENAMETOOLONG: