diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-10 07:48:47 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-10 07:48:47 -0500 |
commit | e462dc553ea5e09d4713e7c35a11ed331dc6f369 (patch) | |
tree | a610558337fe270cc778643e41a209d4d8bca577 /tools/perf | |
parent | 4385428a477559b26736cc3c80d8b68f31126c71 (diff) |
perf sched: Fix allocation result check
Bug introduced in ce47dc56.
Reported-by: Mike Galbraith <efault@gmx.de>
Cc: Chris Samuel <chris@csamuel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 7a4ebeb8b016..54024d2a017e 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1861,7 +1861,7 @@ static int __cmd_record(int argc, const char **argv) | |||
1861 | rec_argc = ARRAY_SIZE(record_args) + argc - 1; | 1861 | rec_argc = ARRAY_SIZE(record_args) + argc - 1; |
1862 | rec_argv = calloc(rec_argc + 1, sizeof(char *)); | 1862 | rec_argv = calloc(rec_argc + 1, sizeof(char *)); |
1863 | 1863 | ||
1864 | if (rec_argv) | 1864 | if (rec_argv == NULL) |
1865 | return -ENOMEM; | 1865 | return -ENOMEM; |
1866 | 1866 | ||
1867 | for (i = 0; i < ARRAY_SIZE(record_args); i++) | 1867 | for (i = 0; i < ARRAY_SIZE(record_args); i++) |