fix two memleaks

This commit is contained in:
Mikael Magnusson 2006-06-11 10:21:35 +00:00
parent e0aa54a891
commit dd48997668
2 changed files with 4 additions and 3 deletions

View file

@ -203,12 +203,12 @@ RrFont *RrFontOpen(const RrInstance *inst, gchar *fontstring)
void RrFontClose(RrFont *f)
{
if (f) {
XftFontClose(RrDisplay(f->inst), f->xftfont);
g_free(f);
}
#ifdef USE_PANGO
pango_font_description_free(f->pango_font_description);
#endif
XftFontClose(RrDisplay(f->inst), f->xftfont);
g_free(f);
}
}
static void font_measure_full(const RrFont *f, const gchar *str,

View file

@ -329,6 +329,7 @@ void RrMinsize(RrAppearance *a, gint *w, gint *h)
*w = MAX(*w, m->width + 4);
m->height = RrFontHeight(a->texture[i].data.text.font);
*h += MAX(*h, m->height);
g_free(m);
break;
case RR_TEXTURE_RGBA:
*w += MAX(*w, a->texture[i].data.rgba.width);