Skip to content

Commit

Permalink
perf_counter tools: Fix storage size allocation of callchain list
Browse files Browse the repository at this point in the history
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 <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1246419315-9968-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Jul 1, 2009
1 parent 087021b commit 9198aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/callchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9198aa7

Please sign in to comment.