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:
90aec6a
)
fixed exceptionally stupid mem leak
author
Matthias Kramm
<kramm@quiss.org>
Fri, 5 Feb 2010 07:01:40 +0000
(23:01 -0800)
committer
Matthias Kramm
<kramm@quiss.org>
Fri, 5 Feb 2010 07:01:40 +0000
(23:01 -0800)
lib/devices/pdf.c
patch
|
blob
|
history
diff --git
a/lib/devices/pdf.c
b/lib/devices/pdf.c
index
5346891
..
f6df3f5
100644
(file)
--- a/
lib/devices/pdf.c
+++ b/
lib/devices/pdf.c
@@
-77,13
+77,13
@@
void pdf_startpage(gfxdevice_t*dev, int width, int height)
static int mkline(gfxline_t*line, PDF*p, char fill)
{
static int mkline(gfxline_t*line, PDF*p, char fill)
{
- double x,y;
+ double x=0,y=0;
char first = 1;
int ret = 0;
char first = 1;
int ret = 0;
- char free_line = 0;
+ gfxline_t*free_line = 0;
if(fill) {
line = gfxline_restitch(gfxline_clone(line));
if(fill) {
line = gfxline_restitch(gfxline_clone(line));
- free_line = 1;
+ free_line = line;
}
while(line) {
if(line->type == gfx_moveTo && (x!=line->x || y!=line->y || first)) {
}
while(line) {
if(line->type == gfx_moveTo && (x!=line->x || y!=line->y || first)) {
@@
-108,7
+108,7
@@
static int mkline(gfxline_t*line, PDF*p, char fill)
line = line->next;
}
if(free_line)
line = line->next;
}
if(free_line)
- gfxline_free(line);
+ gfxline_free(free_line);
return ret;
}
return ret;
}