From: Dana Jansens Date: Sun, 14 Sep 2003 06:42:33 +0000 (+0000) Subject: free XImages X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=35593123212d6f88e63a9b8a3827e983f27e841d;p=chaz%2Fopenbox free XImages --- diff --git a/render/render.c b/render/render.c index 95c5095b..c1ed1e11 100644 --- a/render/render.c +++ b/render/render.c @@ -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; }