Coverity #616: Fix a rare memory leak.

This commit is contained in:
Adam Jackson 2006-04-03 01:51:54 +00:00
parent 01ebd63301
commit 7ef95da8a3
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-04-02 Adam Jackson <ajax@freedesktop.org>
* hw/xnest/Pixmap.c:
Coverity #616: Fix a rare memory leak.
2006-04-02 Adam Jackson <ajax@freedesktop.org>
* os/xdmauth.c:

View File

@ -102,7 +102,10 @@ xnestPixmapToRegion(PixmapPtr pPixmap)
pReg = REGION_CREATE(pPixmap->drawable.pScreen, NULL, 1);
pTmpReg = REGION_CREATE(pPixmap->drawable.pScreen, NULL, 1);
if(!pReg || !pTmpReg) return NullRegion;
if(!pReg || !pTmpReg) {
XDestroyImage(ximage);
return NullRegion;
}
for (y = 0; y < pPixmap->drawable.height; y++) {
Box.y1 = y;