mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +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);
|
||||
} else {
|
||||
(void) ImagingError_ModeError();
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user