examples: Fix file descriptor leak in iccfrompng.c by closing input file

Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
Sanjay Jangid 2025-05-31 16:41:42 +05:30 committed by Cosmin Truta
parent 0cc6436ef5
commit 197bbfe0d5

View File

@ -161,6 +161,9 @@ extract_one_file(const char *filename)
else else
fprintf(stderr, "%s: could not open file\n", filename); fprintf(stderr, "%s: could not open file\n", filename);
if (fp != NULL)
fclose(fp);
return result; return result;
} }