perf tools: Get rid of malloc_or_die() in trace-event-read.c
authorNamhyung Kim <namhyung.kim@lge.com>
Thu, 21 Mar 2013 07:18:49 +0000 (16:18 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 21 Mar 2013 16:32:46 +0000 (13:32 -0300)
commita4c983670e0f4285fe115cb2ad697c978c7950b6
treef3b4f5a206c991213b9de583e31e76ba85597bf4
parent3dce2ce3cc40ece2562a5a83e879b4bfb451476c
perf tools: Get rid of malloc_or_die() in trace-event-read.c

Check return value of malloc() and fail if error.  Now read_string()
can return NULL also check its return value and bail out.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1363850332-25297-7-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/trace-event-read.c