From: Mikael Magnusson Date: Sun, 11 Jun 2006 10:21:35 +0000 (+0000) Subject: fix two memleaks X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=dd489976687342c82bb8c8e884a7af7c08d364fc;p=chaz%2Fopenbox fix two memleaks --- diff --git a/render/font.c b/render/font.c index 11a8edc6..b715bb80 100644 --- a/render/font.c +++ b/render/font.c @@ -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, diff --git a/render/render.c b/render/render.c index 05f7c993..355a2451 100644 --- a/render/render.c +++ b/render/render.c @@ -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);