From 10d3cff7437558adc906e2d0f208ab27aeee3886 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 25 Feb 2009 20:09:33 +0000 Subject: [PATCH] Fix memory leak and make freeing bitmaps that might be cached a little safer. svn path=/trunk/netsurf/; revision=6620 --- amiga/plotters.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/amiga/plotters.c b/amiga/plotters.c index d32731608..30fc761c4 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -402,6 +402,11 @@ bool ami_bitmap(int x, int y, int width, int height, BLITA_UseSrcAlpha,!bitmap->opaque, TAG_DONE); + if(tbm != bitmap->nativebm) + { + p96FreeBitMap(tbm); + } + return true; } @@ -413,11 +418,6 @@ bool ami_bitmap_tile(int x, int y, int width, int height, int max_width,max_height; struct BitMap *tbm = NULL; -/* - SetRPAttrs(currp,RPTAG_BPenColor,p96EncodeColor(RGBFB_A8B8G8R8,bg), - TAG_DONE); -*/ - if(!(repeat_x || repeat_y)) return ami_bitmap(x, y, width, height, bitmap, bg, content); @@ -457,7 +457,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height, break; } - if(!option_cache_bitmaps) + if(tbm != bitmap->nativebm) { p96FreeBitMap(tbm); }