Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sasha Levin and committed by
Arnaldo Carvalho de Melo
fba7a782 6bf1a295

+1 -1
+1 -1
tools/lib/traceevent/event-parse.c
··· 2481 2481 2482 2482 free_token(token); 2483 2483 arg = alloc_arg(); 2484 - if (!field) { 2484 + if (!arg) { 2485 2485 do_warning("%s: not enough memory!", __func__); 2486 2486 *tok = NULL; 2487 2487 return EVENT_ERROR;