diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-04-14 23:43:23 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-04-14 23:43:23 +0000 |
commit | c354738e44bb1c66a0a31380f4404604bc72c883 (patch) | |
tree | 4151a064fe1de2cda59730bf128040b121505431 | |
parent | 101833e7c19550686688bfc90b3936dec5127d38 (diff) |
Coverity #804: Another leak on OOM path.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | hw/dmx/dmxpixmap.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,10 @@ 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: Coverity #806: Another memory leak on OOM path. diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c index e95ddd72e..4a669fdd9 100644 --- a/hw/dmx/dmxpixmap.c +++ b/hw/dmx/dmxpixmap.c @@ -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; |