From: Frederic Weisbecker Date: Wed, 1 Jul 2009 03:35:13 +0000 (+0200) Subject: perf_counter tools: Fix storage size allocation of callchain list X-Git-Tag: MMI-PSA29.97-13-9~27346^2~64 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9198aa77b69647d1d91207f8075763abe7dc0bf4;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf_counter tools: Fix storage size allocation of callchain list Fix a confusion while giving the size of a callchain list during its allocation. We are using the wrong structure size. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Anton Blanchard Cc: Arnaldo Carvalho de Melo LKML-Reference: <1246419315-9968-2-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index ad3c28578961..bbf7813fefe0 100644 --- a/tools/perf/util/callchain.c +++ b/tools/perf/util/callchain.c @@ -74,7 +74,7 @@ fill_node(struct callchain_node *node, struct ip_callchain *chain, int start) for (i = start; i < chain->nr; i++) { struct callchain_list *call; - call = malloc(sizeof(*chain)); + call = malloc(sizeof(*call)); if (!call) { perror("not enough memory for the code path tree"); return;