summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2012-12-21 21:00:58 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-24 20:40:16 +0100
commitfba7a78220fd969beeaa9abbb97c5f7027a7b4fd (patch)
tree31d68c09decc734dafd666f316bdeab5a2a222cc
parentperf ui/gtk: Setup browser window early (diff)
downloadlinux-fba7a78220fd969beeaa9abbb97c5f7027a7b4fd.tar.xz
linux-fba7a78220fd969beeaa9abbb97c5f7027a7b4fd.zip
tools lib traceevent: test correct variable after allocation
we've tested the wrong variable for allocation failure, fix it to test the right one. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1356120062-2648-1-git-send-email-sasha.levin@oracle.com Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/lib/traceevent/event-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 5a824e355d04..7538a1f9c557 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2481,7 +2481,7 @@ process_dynamic_array(struct event_format *event, struct print_arg *arg, char **
free_token(token);
arg = alloc_arg();
- if (!field) {
+ if (!arg) {
do_warning("%s: not enough memory!", __func__);
*tok = NULL;
return EVENT_ERROR;