]> Dogcows Code - chaz/openbox/commitdiff
free XImages
authorDana Jansens <danakj@orodu.net>
Sun, 14 Sep 2003 06:42:33 +0000 (06:42 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 14 Sep 2003 06:42:33 +0000 (06:42 +0000)
render/render.c

index 95c5095b48647e1f7b3f622bdcf784186635a9ac..c1ed1e114a127c6e813bff67b81f7baab9e8a705 100644 (file)
@@ -361,8 +361,10 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
     if (mask) {
         xm = XGetImage(RrDisplay(inst), mask,
                        0, 0, mw, mh, 0xffffffff, ZPixmap);
-        if (!xm)
+        if (!xm) {
+            XDestroyImage(xi);
             return FALSE;
+        }
     }
 
     *data = g_new(RrPixel32, pw * ph);
@@ -383,5 +385,9 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
     *w = pw;
     *h = ph;
 
+    XDestroyImage(xi);
+    if (mask)
+        XDestroyImage(xm);
+
     return TRUE;
 }
This page took 0.02845 seconds and 4 git commands to generate.