Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static yajl_val context_pop(context_t *ctx)
ctx->stack = stack->next;

v = stack->value;

free (stack->key);
free (stack);

return (v);
Expand Down Expand Up @@ -444,7 +444,14 @@ yajl_val yajl_tree_parse (const char *input,
(const unsigned char *) input,
strlen(input)));
}
while(ctx.stack != NULL) {
yajl_val v = context_pop(&ctx);
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