From: Pavel Tvrdik Date: Tue, 6 Sep 2016 15:18:15 +0000 (+0200) Subject: Filter: Prefer xmalloc/xfree to malloc/free X-Git-Tag: v1.6.1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc00f058154bb4a630d24d64a55b5f181d235c63;p=thirdparty%2Fbird.git Filter: Prefer xmalloc/xfree to malloc/free --- diff --git a/filter/tree.c b/filter/tree.c index 59ebf579b..328c7184b 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; }