diff options
Diffstat (limited to 'tests/gdimagefill/bug00002_1.c')
-rw-r--r-- | tests/gdimagefill/bug00002_1.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/gdimagefill/bug00002_1.c b/tests/gdimagefill/bug00002_1.c index 3a66d7b..d348f0b 100644 --- a/tests/gdimagefill/bug00002_1.c +++ b/tests/gdimagefill/bug00002_1.c @@ -21,13 +21,14 @@ int main() file = gdTestTempFile("bug00002_1.png"); fp = fopen(file, "wb"); - free(file); + if (fp == NULL) { gdTestErrorMsg("Cannot create image from <%s>\n", file); + free(file); gdImageDestroy(im); return 1; } - + free(file); gdImagePng(im,fp); fclose(fp); |