mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
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:
parent
0cc6436ef5
commit
197bbfe0d5
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user