args to jq_compile_args were not getting freed when there were errors in the compile
This commit is contained in:
1 parent
3a1dab5396
commit
17a319d120
1 file changed
+1
-1
@@ -770,12 +770,12 @@ int jq_compile_args(jq_state *jq, const char* str, jv args) {
|
||||
program = gen_var_binding(gen_const(value), jv_string_value(name), program);
|
||||
jv_free(name);
|
||||
}
|
||||
jv_free(args);
|
||||
nerrors = builtins_bind(jq, &program);
|
||||
if (nerrors == 0) {
|
||||
nerrors = block_compile(program, &locations, &jq->bc);
|
||||
}
|
||||
}
|
||||
jv_free(args);
|
||||
if (nerrors) {
|
||||
jv s = jv_string_fmt("%d compile %s", nerrors,
|
||||
nerrors > 1 ? "errors" : "error");
|
||||
|
||||
Reference in new issue
Block a user