Coverity #804: Another leak on OOM path.

This commit is contained in:
Adam Jackson 2006-04-14 23:43:32 +00:00
parent d61219aaad
commit 0e62d92d5b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-04-14 Adam Jackson <ajax@freedesktop.org>
* hw/dmx/dmxpixmap.c:
Coverity #804: Another leak on OOM path.
2006-04-14 Adam Jackson <ajax@freedesktop.org>
* mi/micmap.c:

View File

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