mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tools lib traceevent: test correct variable after allocation
@ 2012-12-21 20:00 Sasha Levin
  2012-12-26  4:28 ` Namhyung Kim
  2013-01-25 11:25 ` [tip:perf/core] " tip-bot for Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Levin @ 2012-12-21 20:00 UTC (permalink / raw)
  To: Namhyung Kim, Steven Rostedt, Arnaldo Carvalho de Melo,
	Frederic Weisbecker, linux-kernel
  Cc: Sasha Levin

we've tested the wrong variable for allocation failure, fix it to
test the right one.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 tools/lib/traceevent/event-parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 5a824e3..7538a1f 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;
-- 
1.8.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-25 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-21 20:00 [PATCH] tools lib traceevent: test correct variable after allocation Sasha Levin
2012-12-26  4:28 ` Namhyung Kim
2013-01-25 11:25 ` [tip:perf/core] " tip-bot for Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome