jq_fuzz_execute: fix memory leak
Signed-off-by: David Korczynski <david@adalogics.com>
This commit is contained in:
1 parent
bfb7fd570f
commit
693a7261e5
1 file changed
+4
-2
@@ -27,9 +27,11 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
jv_free(actual);
|
||||
}
|
||||
jv_free(next);
|
||||
} else {
|
||||
// Only free if input is invalid as otherwise jq_teardown
|
||||
// frees it.
|
||||
jv_free(input);
|
||||
}
|
||||
|
||||
// Do not free "input" as this is handled by jq_teardown.
|
||||
}
|
||||
}
|
||||
jq_teardown(&jq);
|
||||
|
||||
Reference in new issue
Block a user