Skip to content

Commit

Permalink
fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang.jiujiu authored and berrange committed Jul 10, 2023
1 parent c4304a2 commit 9cb8710
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/yajl_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9cb8710

Please sign in to comment.