diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-18 12:51:31 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-18 12:51:31 +0000 |
commit | f7e971cad05b832a5573187fd2008bf02b79b8c7 (patch) | |
tree | 4119ddacce8ae65bfc53d37f93ffaa3debdff733 | |
parent | 5c0865f9424d33f0c167d00b46947860f493bf27 (diff) | |
download | netsurf-f7e971cad05b832a5573187fd2008bf02b79b8c7.tar.gz netsurf-f7e971cad05b832a5573187fd2008bf02b79b8c7.tar.bz2 |
fix missing free on error
svn path=/trunk/netsurf/; revision=6556
-rw-r--r-- | framebuffer/fb_32bpp_plotters.c | 4 |
1 files changed, 3 insertions, 1 deletions
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)) |