.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * call-path.h: Manipulate a tree data structure containing function call paths |
---|
3 | 4 | * Copyright (c) 2014, Intel Corporation. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify it |
---|
6 | | - * under the terms and conditions of the GNU General Public License, |
---|
7 | | - * version 2, as published by the Free Software Foundation. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
---|
10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
12 | | - * more details. |
---|
13 | | - * |
---|
14 | 5 | */ |
---|
15 | 6 | |
---|
16 | 7 | #include <linux/rbtree.h> |
---|
17 | 8 | #include <linux/list.h> |
---|
| 9 | +#include <linux/zalloc.h> |
---|
| 10 | +#include <stdlib.h> |
---|
18 | 11 | |
---|
19 | | -#include "util.h" |
---|
20 | 12 | #include "call-path.h" |
---|
21 | 13 | |
---|
22 | 14 | static void call_path__init(struct call_path *cp, struct call_path *parent, |
---|
.. | .. |
---|
48 | 40 | struct call_path_block *pos, *n; |
---|
49 | 41 | |
---|
50 | 42 | list_for_each_entry_safe(pos, n, &cpr->blocks, node) { |
---|
51 | | - list_del(&pos->node); |
---|
| 43 | + list_del_init(&pos->node); |
---|
52 | 44 | free(pos); |
---|
53 | 45 | } |
---|
54 | 46 | free(cpr); |
---|