From 184c013ed3e233c3564eb513113c3c12bfd185db Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 10 May 2010 10:56:50 -0300 Subject: [PATCH] --- yaml --- r: 191331 b: refs/heads/master c: cdd5b75b0cd24c4d6a98b12a219217b1ccfe2586 h: refs/heads/master i: 191329: b6d7787f05359663a2756e3a6fc8ceff6056fbc8 191327: cfb369db0c75108795910fc91d3af0ffc2edad99 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/callchain.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 6e4d764cd693..afc492c489c9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7f8264539c62378cccbdf9b598927b034bef4a92 +refs/heads/master: cdd5b75b0cd24c4d6a98b12a219217b1ccfe2586 diff --git a/trunk/tools/perf/util/callchain.c b/trunk/tools/perf/util/callchain.c index ac148613afe8..21a52e0a4435 100644 --- a/trunk/tools/perf/util/callchain.c +++ b/trunk/tools/perf/util/callchain.c @@ -167,7 +167,7 @@ create_child(struct callchain_node *parent, bool inherit_children) { struct callchain_node *new; - new = malloc(sizeof(*new)); + new = zalloc(sizeof(*new)); if (!new) { perror("not enough memory to create child for code path tree"); return NULL; @@ -213,7 +213,7 @@ fill_node(struct callchain_node *node, struct resolved_chain *chain, int start) for (i = start; i < chain->nr; i++) { struct callchain_list *call; - call = malloc(sizeof(*call)); + call = zalloc(sizeof(*call)); if (!call) { perror("not enough memory for the code path tree"); return; @@ -386,7 +386,7 @@ int append_chain(struct callchain_node *root, struct ip_callchain *chain, if (!chain->nr) return 0; - filtered = malloc(sizeof(*filtered) + + filtered = zalloc(sizeof(*filtered) + chain->nr * sizeof(struct resolved_ip)); if (!filtered) return -ENOMEM;