Skip to content

Commit

Permalink
Make sure there is no leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud committed Mar 6, 2025
1 parent 22ed960 commit 2480cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/shared/avifjpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,11 +908,11 @@ static avifBool avifJPEGReadInternal(FILE * f,
uint8_t * iccDataTmp;
unsigned int iccDataLen;
if (read_icc_profile(&cinfo, &iccDataTmp, &iccDataLen)) {
iccData = iccDataTmp;
if (requestedFormat == AVIF_PIXEL_FORMAT_YUV400) {
fprintf(stderr, "The RGB ICC profile is asked to be kept while the output image is gray.\n");
goto cleanup;
}
iccData = iccDataTmp;
if (avifImageSetProfileICC(avif, iccDataTmp, (size_t)iccDataLen) != AVIF_RESULT_OK) {
fprintf(stderr, "Setting ICC profile failed: %s (out of memory)\n", inputFilename);
goto cleanup;
Expand Down

0 comments on commit 2480cec

Please sign in to comment.