From 6839622183b74914ed0bcb83387fedf6459e2c5c Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 17 Feb 2004 12:41:38 +0000 Subject: [project @ 2004-02-17 12:41:38 by jmb] Begin save complete support. Fix memory leak when using Select PNG renderer. (commented out lines can probably removed) svn path=/import/netsurf/; revision=556 --- riscos/png.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'riscos/png.c') diff --git a/riscos/png.c b/riscos/png.c index 8105ebfe7..20597fa57 100644 --- a/riscos/png.c +++ b/riscos/png.c @@ -69,11 +69,11 @@ void nspng_init(void) void nspng_create(struct content *c, const char *params[]) { #ifndef NO_IFC - if (imagefileconvert) { +// if (imagefileconvert) { c->data.other.data = xcalloc(0, 1); c->data.other.length = 0; - return; - } +// return; +// } #endif c->data.png.sprite_area = 0; @@ -97,14 +97,14 @@ void nspng_create(struct content *c, const char *params[]) void nspng_process_data(struct content *c, char *data, unsigned long size) { #ifndef NO_IFC - if (imagefileconvert) { +// if (imagefileconvert) { c->data.png.data = xrealloc(c->data.png.data, c->data.png.length + size); memcpy(c->data.png.data + c->data.png.length, data, size); c->data.png.length += size; - c->size += size; - return; - } +// c->size += size; +// return; +// } #endif if (setjmp(png_jmpbuf(c->data.png.png))) { @@ -366,6 +366,11 @@ void nspng_destroy(struct content *c) { xfree(c->title); xfree(c->data.png.sprite_area); +#ifndef NO_IFC +// if (imagefileconvert) { + xfree(c->data.png.data); +// } +#endif } -- cgit v1.2.3