diff options
Diffstat (limited to 'fuzzing/format_command_fuzzer.c')
-rw-r--r-- | fuzzing/format_command_fuzzer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fuzzing/format_command_fuzzer.c b/fuzzing/format_command_fuzzer.c index 91adeac..de125e0 100644 --- a/fuzzing/format_command_fuzzer.c +++ b/fuzzing/format_command_fuzzer.c @@ -48,10 +48,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { memcpy(new_str, data, size); new_str[size] = '\0'; - redisFormatCommand(&cmd, new_str); - - if (cmd != NULL) + if (redisFormatCommand(&cmd, new_str) != -1) hi_free(cmd); + free(new_str); return 0; } |