From bc00f058154bb4a630d24d64a55b5f181d235c63 Mon Sep 17 00:00:00 2001 From: Pavel Tvrdik Date: Tue, 6 Sep 2016 17:18:15 +0200 Subject: Filter: Prefer xmalloc/xfree to malloc/free --- filter/tree.c | 4 ++-- 1 file 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; } -- cgit v1.2.3