diff --git a/src/yajl_tree.c b/src/yajl_tree.c index 4b3cf2b1..56c7012f 100644 --- a/src/yajl_tree.c +++ b/src/yajl_tree.c @@ -449,6 +449,9 @@ yajl_val yajl_tree_parse (const char *input, yajl_tree_free(v); } yajl_free (handle); + //If the requested memory is not released in time, it will cause memory leakage + if(ctx.root) + yajl_tree_free(ctx.root); return NULL; }