fix memory leak

This commit is contained in:
William Langford committed 2018-08-30 21:09:04 -04:00
1 parent 46d1ce2667
commit dd4cec664c
1 file changed
+2
+2
View File
@@ -819,6 +819,8 @@ jv jq_next(jq_state *jq) {
if (opcode != ON_BACKTRACK(DESTRUCTURE_ALT)) {
jv_free(stack_pop(jq)); // free the input
stack_push(jq, jv_invalid_get_msg(jq->error)); // push the error's message
} else {
jv_free(jq->error);
}
jq->error = jv_null();
uint16_t offset = *pc++;