perf timechart: Use zalloc and fix a couple leaks
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Sep 2012 14:16:40 +0000 (11:16 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Sep 2012 14:43:38 +0000 (11:43 -0300)
commite0dcd6fb2564c20e53ee8b7d2884a7e375fe9e75
tree6b39707b2884f9eb93a5831ff850898a157e8ce8
parent746f16ec6ae370d58ecf4370c9955bd6f35d44a3
perf timechart: Use zalloc and fix a couple leaks

Use zalloc for the malloc+memset open coded sequence.

Fix leak on the #ifdef'ed C state handling and when detecting invalid
data in p_state_change().

Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-timechart.c