]> Dogcows Code - chaz/openbox/blobdiff - render/render.c
api cleanups for render/theme.h
[chaz/openbox] / 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.026778 seconds and 4 git commands to generate.