commit | e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2 | [log] [tgz] |
---|---|---|
author | Namhyung Kim <[email protected]> | Tue Aug 12 15:40:34 2014 +0900 |
committer | Arnaldo Carvalho de Melo <[email protected]> | Wed Aug 13 16:30:22 2014 -0300 |
tree | c5706887be8e39484c8c1fc04693159ab0feba86 | |
parent | 6cc870f09da4d50722bc1caa27cad51733ce36f6 [diff] |
perf symbols: Fix a memory leak in vmlinux_path__init() When uname() failed, it should free vmlinux_path. Acked-by: Jiri Olsa <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 581c568..009a9d0 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c
@@ -1772,7 +1772,7 @@ return 0; if (uname(&uts) < 0) - return -1; + goto out_fail; snprintf(bf, sizeof(bf), "/boot/vmlinux-%s", uts.release); vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);