summaryrefslogtreecommitdiff
blob: e2ed58fb17663cfecbb6326418a0842d8203d297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff --git a/include/mounts.h b/include/mounts.h
index ddb7e4c..854e1fb 100644
--- a/include/mounts.h
+++ b/include/mounts.h
@@ -84,7 +84,7 @@ typedef void (*tree_free_t) (struct tree_node *n);
 struct tree_ops {
 	tree_new_t new;
 	tree_cmp_t cmp;
-	tree_free_t free;
+	tree_free_t set_free;
 };
 
 typedef int (*tree_work_fn_t) (struct tree_node *n, void *ptr);
diff --git a/lib/mounts.c b/lib/mounts.c
index 4c86688..1e54a33 100644
--- a/lib/mounts.c
+++ b/lib/mounts.c
@@ -75,7 +75,7 @@ static void tree_mnt_free(struct tree_node *n);
 static struct tree_ops mnt_ops = {
 	.new = tree_mnt_new,
 	.cmp = tree_mnt_cmp,
-	.free = tree_mnt_free,
+	.set_free = tree_mnt_free,
 };
 static struct tree_ops *tree_mnt_ops = &mnt_ops;
 
@@ -86,7 +86,7 @@ static void tree_host_free(struct tree_node *n);
 static struct tree_ops host_ops = {
 	.new = tree_host_new,
 	.cmp = tree_host_cmp,
-	.free = tree_host_free,
+	.set_free = tree_host_free,
 };
 static struct tree_ops *tree_host_ops = &host_ops;
 
@@ -97,7 +97,7 @@ static void tree_mapent_free(struct tree_node *n);
 static struct tree_ops mapent_ops = {
 	.new = tree_mapent_new,
 	.cmp = tree_mapent_cmp,
-	.free = tree_mapent_free,
+	.set_free = tree_mapent_free,
 };
 static struct tree_ops *tree_mapent_ops = &mapent_ops;
 
@@ -1360,7 +1360,7 @@ void tree_free(struct tree_node *root)
 		tree_free(root->right);
 	if (root->left)
 		tree_free(root->left);
-	ops->free(root);
+	ops->set_free(root);
 }
 
 int tree_traverse_inorder(struct tree_node *n, tree_work_fn_t work, void *ptr)