summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Tvrdik <pawel.tvrdik@gmail.com>2016-09-06 17:18:15 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-09-15 15:24:00 +0200
commitbc00f058154bb4a630d24d64a55b5f181d235c63 (patch)
tree1a4df2f1f203abf1f6b316878ad72c4ed0564405
parent4adcb9df1bf551cc5fd1145c09af1843fdc4fe85 (diff)
Filter: Prefer xmalloc/xfree to malloc/free
-rw-r--r--filter/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/tree.c b/filter/tree.c
index 59ebf579..328c7184 100644
--- a/filter/tree.c
+++ b/filter/tree.c
@@ -82,7 +82,7 @@ build_tree(struct f_tree *from)
if (len <= 1024)
buf = alloca(len * sizeof(struct f_tree *));
else
- buf = malloc(len * sizeof(struct f_tree *));
+ buf = xmalloc(len * sizeof(struct f_tree *));
/* Convert a degenerated tree into an sorted array */
i = 0;
@@ -94,7 +94,7 @@ build_tree(struct f_tree *from)
root = build_tree_rec(buf, 0, len);
if (len > 1024)
- free(buf);
+ xfree(buf);
return root;
}