From 22ca65a59d35c0b8fa5e8b7799f683167f102cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 24 Jun 2024 17:27:58 +0200 Subject: [PATCH] fuzzer_set_property: destroy mpv also on error Shouldn't matter much and in fact even LSAN doesn't complain, but we should clean it correctly. Fixes: 1225bcbd4112d2f5880c7273f90f56725123fe8a --- fuzzers/fuzzer_set_property.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fuzzers/fuzzer_set_property.c b/fuzzers/fuzzer_set_property.c index 8ba76cf70d..dc14e6518e 100644 --- a/fuzzers/fuzzer_set_property.c +++ b/fuzzers/fuzzer_set_property.c @@ -75,7 +75,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) } if (ret != MPV_ERROR_SUCCESS) - return 0; + goto done; #if MPV_RUN check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes")); @@ -93,6 +93,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) } #endif +done: mpv_terminate_destroy(ctx); return 0;