free XImages

This commit is contained in:
Dana Jansens 2003-09-14 06:42:33 +00:00
parent 3dc4750ea4
commit 3559312321

View file

@ -361,9 +361,11 @@ 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);
RrIncreaseDepth(inst, *data, xi);
@ -383,5 +385,9 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
*w = pw;
*h = ph;
XDestroyImage(xi);
if (mask)
XDestroyImage(xm);
return TRUE;
}