summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-14 23:43:23 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-14 23:43:23 +0000
commitc354738e44bb1c66a0a31380f4404604bc72c883 (patch)
tree4151a064fe1de2cda59730bf128040b121505431
parent101833e7c19550686688bfc90b3936dec5127d38 (diff)
Coverity #804: Another leak on OOM path.
-rw-r--r--ChangeLog5
-rw-r--r--hw/dmx/dmxpixmap.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e285bd19..38b87a658 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;