diff --git a/fuzzing/color_conversion_fuzzer.cc b/fuzzing/color_conversion_fuzzer.cc index c80acfd879..170ac6790c 100644 --- a/fuzzing/color_conversion_fuzzer.cc +++ b/fuzzing/color_conversion_fuzzer.cc @@ -256,6 +256,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) nullptr, output_bpp, options->color_conversion_options); + + heif_encoding_options_free(options); + if (out_image_result.error) { // Conversion is not supported. return 0; @@ -263,8 +266,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) auto out_image = *out_image_result; - heif_encoding_options_free(options); - assert(out_image->get_width() == width); assert(out_image->get_height() == height); assert(out_image->get_chroma_format() ==