aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c
index 5706c4c..479e2a6 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -25,7 +25,8 @@ int tree_insert ( struct tree_node** _root, char* _key, void* _data )
*node = malloc (sizeof(typeof(**node)));
if( ! *node )
- return 1;
+ return 2;
+ memset ( *node, 0, sizeof(typeof(**node)) );
(*node)->key = _key;
(*node)->data = _data;