diff options
Diffstat (limited to '')
-rw-r--r-- | src/tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tree.c b/src/tree.c index d624daadc..466ff05ab 100644 --- a/src/tree.c +++ b/src/tree.c @@ -17,6 +17,7 @@ */ #include "tree.h" +#include "utils.h" #include <assert.h> #include <stdlib.h> @@ -59,7 +60,7 @@ static TreeNode * _MakeNode(void) { - TreeNode * ret = malloc(sizeof(TreeNode)); + TreeNode * ret = xmalloc(sizeof(TreeNode)); memset(ret, 0, sizeof(TreeNode)); return ret; } @@ -571,7 +572,7 @@ MakeTree(TreeCompareKeyFunction compareKey, TreeFreeFunction freeKey, TreeFreeFunction freeData) { - Tree * ret = malloc(sizeof(Tree)); + Tree * ret = xmalloc(sizeof(Tree)); ret->compareKey = compareKey; ret->freeKey = freeKey; ret->freeData = freeData; |