diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-04-03 01:51:54 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-04-03 01:51:54 +0000 |
commit | 7ef95da8a3e22e710882590fc47d56893159cb5d (patch) | |
tree | f33b7a2f97d34896d1efb7836c9b842d010ea237 | |
parent | 01ebd633017249c496f378df511586c973d49708 (diff) |
Coverity #616: Fix a rare memory leak.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | hw/xnest/Pixmap.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,10 @@ 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: Coverity #833: Fix a rather nasty memory leak. 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; |