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:
34ea6c3
)
fixed leaking file descriptors
author
Matthias Kramm
<kramm@quiss.org>
Sun, 31 May 2009 13:59:37 +0000
(15:59 +0200)
committer
Matthias Kramm
<kramm@quiss.org>
Sun, 31 May 2009 13:59:37 +0000
(15:59 +0200)
lib/jpeg.c
patch
|
blob
|
history
lib/png.c
patch
|
blob
|
history
diff --git
a/lib/jpeg.c
b/lib/jpeg.c
index
66882b0
..
24bf2ed
100644
(file)
--- a/
lib/jpeg.c
+++ b/
lib/jpeg.c
@@
-362,6
+362,7
@@
int jpeg_load(const char*filename, unsigned char**dest, int*_width, int*_height)
jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
+ fclose(fi);
return 1;
}
diff --git
a/lib/png.c
b/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;
}