git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed exceptionally stupid mem leak
[swftools.git]
/
lib
/
devices
/
pdf.c
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;
}