fixed leaking file descriptors
[swftools.git] / lib / png.c
index d71c19b..b74dfb0 100644 (file)
--- a/lib/png.c
+++ b/lib/png.c
@@ -486,6 +486,7 @@ EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char
     }
 
     if(!png_read_header(fi, &header)) {
+       fclose(fi);
        return 0;
     }