From 35593123212d6f88e63a9b8a3827e983f27e841d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 14 Sep 2003 06:42:33 +0000 Subject: [PATCH] free XImages --- render/render.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- 2.45.2