From dd4cec664cd2a45921189fab2a938a4966191a31 Mon Sep 17 00:00:00 2001 From: William Langford Date: Thu, 30 Aug 2018 21:09:04 -0400 Subject: fix memory leak --- src/execute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/execute.c b/src/execute.c index 8eb41cc7..d7a9615d 100644 --- a/src/execute.c +++ b/src/execute.c @@ -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++; -- cgit v1.2.3