From: Sasha Levin Date: Fri, 21 Dec 2012 20:00:58 +0000 (-0500) Subject: tools lib traceevent: test correct variable after allocation X-Git-Tag: MMI-PSA29.97-13-9~15047^2~13^2~42 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fba7a78220fd969beeaa9abbb97c5f7027a7b4fd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: Namhyung Kim Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1356120062-2648-1-git-send-email-sasha.levin@oracle.com Signed-off-by: Sasha Levin Signed-off-by: Arnaldo Carvalho de Melo --- 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;