From f7e971cad05b832a5573187fd2008bf02b79b8c7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 18 Feb 2009 12:51:31 +0000 Subject: fix missing free on error svn path=/trunk/netsurf/; revision=6556 --- framebuffer/fb_32bpp_plotters.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framebuffer/fb_32bpp_plotters.c b/framebuffer/fb_32bpp_plotters.c index 942632825..8e8f353f6 100644 --- a/framebuffer/fb_32bpp_plotters.c +++ b/framebuffer/fb_32bpp_plotters.c @@ -216,8 +216,10 @@ static bool fb_32bpp_text(int x, int y, const struct css_style *style, x1 = x + (fb_font->width * length); y1 = y + fb_font->height; - if (!fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1)) + if (!fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1)) { + free(buffer); return true; /* text lies outside current clipping region */ + } /* find width and height to plot */ if (height > (y1 - y0)) -- cgit v1.2.3