]> Dogcows Code - chaz/openbox/commitdiff
fix two memleaks
authorMikael Magnusson <mikachu@comhem.se>
Sun, 11 Jun 2006 10:21:35 +0000 (10:21 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Sun, 11 Jun 2006 10:21:35 +0000 (10:21 +0000)
render/font.c
render/render.c

index 11a8edc60843529bc2cb8d498680eca336ec888e..b715bb80b076e4da150dbde4e4f99c3957b02ada 100644 (file)
@@ -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,
index 05f7c9931c11a9837ff26787ae0d24628f72902a..355a245105a52476f1bc842ab621eafe347c6f89 100644 (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);
This page took 0.023572 seconds and 4 git commands to generate.