diff --git a/ChangeLog b/ChangeLog index 5b0decbe8..4df3ec605 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-02 Adam Jackson + + * hw/xnest/Pixmap.c: + Coverity #616: Fix a rare memory leak. + 2006-04-02 Adam Jackson * os/xdmauth.c: diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index 30ffbc6e6..046b73976 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -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;