fix missing free on error

svn path=/trunk/netsurf/; revision=6556
This commit is contained in:
Vincent Sanders 2009-02-18 12:51:31 +00:00
parent 5c0865f942
commit f7e971cad0
1 changed files with 3 additions and 1 deletions

View File

@ -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))