projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
perf tools: Catch a few uncheck calloc/malloc's
[firefly-linux-kernel-4.4.55.git]
/
tools
/
perf
/
builtin-kmem.c
diff --git
a/tools/perf/builtin-kmem.c
b/tools/perf/builtin-kmem.c
index d0a652e9c7081cceb22a1dbad86a75f603b146c5..c9620ff6496ff67bf36836913fa98154d1ef0726 100644
(file)
--- a/
tools/perf/builtin-kmem.c
+++ b/
tools/perf/builtin-kmem.c
@@
-736,6
+736,9
@@
static int __cmd_record(int argc, const char **argv)
rec_argc = ARRAY_SIZE(record_args) + argc - 1;
rec_argv = calloc(rec_argc + 1, sizeof(char *));
+ if (rec_argv == NULL)
+ return -ENOMEM;
+
for (i = 0; i < ARRAY_SIZE(record_args); i++)
rec_argv[i] = strdup(record_args[i]);