summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/call-path.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/call-path.c')
-rw-r--r--tools/perf/util/call-path.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/call-path.c b/tools/perf/util/call-path.c
index c5b90300304d..5c60b8be1cf6 100644
--- a/tools/perf/util/call-path.c
+++ b/tools/perf/util/call-path.c
@@ -6,8 +6,9 @@
#include <linux/rbtree.h>
#include <linux/list.h>
+#include <linux/zalloc.h>
+#include <stdlib.h>
-#include "util.h"
#include "call-path.h"
static void call_path__init(struct call_path *cp, struct call_path *parent,
@@ -39,7 +40,7 @@ void call_path_root__free(struct call_path_root *cpr)
struct call_path_block *pos, *n;
list_for_each_entry_safe(pos, n, &cpr->blocks, node) {
- list_del(&pos->node);
+ list_del_init(&pos->node);
free(pos);
}
free(cpr);