diff options
-rw-r--r-- | src/execute.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/execute.c b/src/execute.c index bc39c0c9..44c76a4c 100644 --- a/src/execute.c +++ b/src/execute.c @@ -1100,7 +1100,8 @@ int jq_compile_args(jq_state *jq, const char* str, jv args) { if (nerrors == 0) { nerrors = block_compile(program, &jq->bc, locations, args = args2obj(args)); } - } + } else + jv_free(args); if (nerrors) jq_report_error(jq, jv_string_fmt("jq: %d compile %s", nerrors, nerrors > 1 ? "errors" : "error")); if (jq->bc) |