fix two memleaks
This commit is contained in:
parent
e0aa54a891
commit
dd48997668
2 changed files with 4 additions and 3 deletions
|
@ -203,12 +203,12 @@ RrFont *RrFontOpen(const RrInstance *inst, gchar *fontstring)
|
|||
void RrFontClose(RrFont *f)
|
||||
{
|
||||
if (f) {
|
||||
#ifdef USE_PANGO
|
||||
pango_font_description_free(f->pango_font_description);
|
||||
#endif
|
||||
XftFontClose(RrDisplay(f->inst), f->xftfont);
|
||||
g_free(f);
|
||||
}
|
||||
#ifdef USE_PANGO
|
||||
pango_font_description_free(f->pango_font_description);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void font_measure_full(const RrFont *f, const gchar *str,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue