mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-21 07:10:43 -05:00
- Zero initialize addrtree allocation.
git-svn-id: file:///svn/unbound/trunk@4102 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
bde9269510
commit
d7304e7c75
2 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
- Remove ECS option after REFUSED answer.
|
- Remove ECS option after REFUSED answer.
|
||||||
- Fix small memory leak in edns_opt_copy_alloc.
|
- Fix small memory leak in edns_opt_copy_alloc.
|
||||||
- Respip dereference after NULL check.
|
- Respip dereference after NULL check.
|
||||||
|
- Zero initialize addrtree allocation.
|
||||||
|
|
||||||
7 April 2017: George
|
7 April 2017: George
|
||||||
- Fix pythonmod for cb changes.
|
- Fix pythonmod for cb changes.
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ addrtree_create(addrlen_t max_depth, void (*delfunc)(void *, void *),
|
||||||
struct addrtree *tree;
|
struct addrtree *tree;
|
||||||
log_assert(delfunc != NULL);
|
log_assert(delfunc != NULL);
|
||||||
log_assert(sizefunc != NULL);
|
log_assert(sizefunc != NULL);
|
||||||
tree = (struct addrtree *)malloc( sizeof (*tree) );
|
tree = (struct addrtree *)calloc(1, sizeof(*tree));
|
||||||
if (!tree)
|
if (!tree)
|
||||||
return NULL;
|
return NULL;
|
||||||
tree->root = node_create(tree, NULL, 0, 0);
|
tree->root = node_create(tree, NULL, 0, 0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue