From b98e8c802642cef8401f1292eb4b5105c2ffaa50 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Mar 2008 19:07:45 +0000 Subject: [PATCH] fixed a mem leak --- lib/devices/record.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/devices/record.c b/lib/devices/record.c index 9647923..b14d51a 100644 --- a/lib/devices/record.c +++ b/lib/devices/record.c @@ -539,6 +539,7 @@ static void replay(struct _gfxdevice*recorddev, gfxdevice_t*device, void*data, i } } } + r->dealloc(r); gfxfontlist_free(fontlist, 1); } void gfxresult_record_replay(gfxresult_t*result, gfxdevice_t*device) @@ -584,6 +585,31 @@ static void record_result_destroy(gfxresult_t*r) free(r); } +static unsigned char printable(unsigned char a) +{ + if(a<32 || a==127) return '.'; + else return a; +} + +static void hexdumpMem(unsigned char*data, int len) +{ + int t; + char ascii[32]; + for(t=0;tinternal; @@ -601,6 +627,8 @@ static gfxresult_t* record_finish(struct _gfxdevice*dev) msg(" record: END\n"); writer_writeU8(&i->w, OP_END); + + gfxfontlist_free(i->fontlist, 0); internal_result_t*ir = (internal_result_t*)rfx_calloc(sizeof(gfxresult_t)); ir->data = writer_growmemwrite_getmem(&i->w); -- 1.7.10.4