Check for out of memory.

git-svn-id: file:///svn/unbound/trunk@3421 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2015-05-01 13:35:02 +00:00
parent f03d3b870e
commit 2910eec34c
+5
View File
@@ -120,6 +120,11 @@ caps_white_apply_cfg(rbtree_t* ntree, struct config_file* cfg)
return 0;
}
n = (struct name_tree_node*)calloc(1, sizeof(*n));
if(!n) {
log_err("out of memory");
free(nm);
return 0;
}
n->node.key = n;
n->name = nm;
n->len = len;