diff options
author | Sasha Levin <[email protected]> | 2012-12-21 15:00:58 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-01-24 16:40:16 -0300 |
commit | fba7a78220fd969beeaa9abbb97c5f7027a7b4fd (patch) | |
tree | 31d68c09decc734dafd666f316bdeab5a2a222cc | |
parent | 6bf1a295a896c8dbe8cad663c6344e8c877a0570 (diff) |
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 <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 2 |
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; |