projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
perf lock: Fix a memory leak on an error path
[linux-2.6-block.git]
/
tools
/
perf
/
builtin-lock.c
diff --git
a/tools/perf/builtin-lock.c
b/tools/perf/builtin-lock.c
index a3ff2f4edbaa5064b040b256eaee1361a34122e5..230461280e4525a612a6842c3a99c7b1a1225929 100644
(file)
--- a/
tools/perf/builtin-lock.c
+++ b/
tools/perf/builtin-lock.c
@@
-2285,8
+2285,10
@@
setup_args:
else
ev_name = strdup(contention_tracepoints[j].name);
- if (!ev_name)
+ if (!ev_name) {
+ free(rec_argv);
return -ENOMEM;
+ }
rec_argv[i++] = "-e";
rec_argv[i++] = ev_name;