cjpeg: Free ICC profile if API error when fuzzing

Fixes #809
This commit is contained in:
DRC
2025-05-13 10:33:15 -04:00
parent 394bcffd03
commit fb7c8e0660

View File

@@ -5,7 +5,8 @@
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2011 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2010, 2013-2014, 2017, 2020-2021, D. R. Commander.
* Copyright (C) 2010, 2013-2014, 2017, 2020-2021, 2025,
D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -185,6 +186,7 @@ static void my_emit_message(j_common_ptr cinfo, int msg_level)
fclose(input_file); \
if (memdst) \
free(outbuffer); \
free(icc_profile); \
return EXIT_FAILURE; \
}