git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2978381
)
fixed leaking file descriptors (spritetool)
author
Matthias Kramm
<kramm@quiss.org>
Mon, 7 Jun 2010 16:45:05 +0000
(09:45 -0700)
committer
Matthias Kramm
<kramm@quiss.org>
Mon, 7 Jun 2010 16:45:18 +0000
(09:45 -0700)
lib/png.c
patch
|
blob
|
history
diff --git
a/lib/png.c
b/lib/png.c
index
35c1a25
..
14de7f6
100644
(file)
--- a/
lib/png.c
+++ b/
lib/png.c
@@
-455,6
+455,7
@@
EXPORT int getPNGdimensions(const char*sname, int*destwidth, int*destheight)
*destwidth = header.width;
*destheight = header.height;
+ fclose(fi);
return 1;
}
@@
-561,6
+562,7
@@
EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char
}
}
+ fclose(fi);
if(!zimagedata || uncompress(imagedata, &imagedatalen, zimagedata, zimagedatalen) != Z_OK) {
printf("Couldn't uncompress %s!\n", sname);
if(zimagedata)
@@
-568,7
+570,6
@@
EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char
return 0;
}
free(zimagedata);
- fclose(fi);
*destwidth = header.width;
*destheight = header.height;