[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1335157118-14658-8-git-send-email-namhyung.kim@lge.com>
Date: Mon, 23 Apr 2012 13:58:34 +0900
From: Namhyung Kim <namhyung.kim@....com>
To: Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>
Cc: Namhyung Kim <namhyung@...il.com>, Ingo Molnar <mingo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Borislav Petkov <bp@...en8.de>,
David Ahern <dsahern@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 07/11] parse-events: Do not call add_event() again if allocation failed
When memory allocation for the field name is failed, do not
goto event_failed since we added the event already.
Signed-off-by: Namhyung Kim <namhyung.kim@....com>
---
parse-events.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/parse-events.c b/parse-events.c
index 3b39923..52cf331 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -4637,7 +4637,8 @@ int pevent_parse_event(struct pevent *pevent,
arg->field.name = strdup(field->name);
if (!arg->field.name) {
do_warning("failed to allocate field name");
- goto event_failed;
+ event->flags |= EVENT_FL_FAILED;
+ return -1;
}
arg->field.field = field;
}
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists