mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
Fix a resource leak: close fp before return (found by cppcheck)
This commit is contained in:
parent
9386a414fc
commit
147f835146
|
@ -71,6 +71,7 @@ ImagingSavePPM(Imaging im, const char* outfile)
|
||||||
fprintf(fp, "P6\n%d %d\n255\n", im->xsize, im->ysize);
|
fprintf(fp, "P6\n%d %d\n255\n", im->xsize, im->ysize);
|
||||||
} else {
|
} else {
|
||||||
(void) ImagingError_ModeError();
|
(void) ImagingError_ModeError();
|
||||||
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user