diff options
Diffstat (limited to 'tools/perf/builtin-kmem.c')
-rw-r--r-- | tools/perf/builtin-kmem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index d0a652e9c708..c9620ff6496f 100644 --- 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) | |||
736 | rec_argc = ARRAY_SIZE(record_args) + argc - 1; | 736 | rec_argc = ARRAY_SIZE(record_args) + argc - 1; |
737 | rec_argv = calloc(rec_argc + 1, sizeof(char *)); | 737 | rec_argv = calloc(rec_argc + 1, sizeof(char *)); |
738 | 738 | ||
739 | if (rec_argv == NULL) | ||
740 | return -ENOMEM; | ||
741 | |||
739 | for (i = 0; i < ARRAY_SIZE(record_args); i++) | 742 | for (i = 0; i < ARRAY_SIZE(record_args); i++) |
740 | rec_argv[i] = strdup(record_args[i]); | 743 | rec_argv[i] = strdup(record_args[i]); |
741 | 744 | ||