From 41fb5e89c44428537fb52f597febfcb491377502 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Thu, 4 Feb 2010 23:01:40 -0800 Subject: [PATCH] fixed exceptionally stupid mem leak --- lib/devices/pdf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index 5346891..f6df3f5 100644 --- 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) { - double x,y; + double x=0,y=0; char first = 1; int ret = 0; - char free_line = 0; + gfxline_t*free_line = 0; 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)) { @@ -108,7 +108,7 @@ static int mkline(gfxline_t*line, PDF*p, char fill) line = line->next; } if(free_line) - gfxline_free(line); + gfxline_free(free_line); return ret; } -- 1.7.10.4