[PATCH 3/4] Coverity: mi/mibitblt.c: leaked_storage: Variable "prgnSrcClip" goes out of scope

Oliver McFadden oliver.mcfadden at nokia.com
Mon Dec 28 02:02:57 PST 2009


alloc_fn: Called allocation function "miRegionCreate"
var_assign: Assigned variable "prgnSrcClip" to storage returned from "miRegionCreate(&box, 1)"

Signed-off-by: Oliver McFadden <oliver.mcfadden at nokia.com>
---
 mi/mibitblt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index cc8b11d..a4d0b8d 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -156,6 +156,8 @@ miCopyArea(DrawablePtr  pSrcDrawable,
            xfree(pwidthFirst);
        if (pptFirst)
            xfree(pptFirst);
+       if (pSrcDrawable->type == DRAWABLE_PIXMAP)
+	   REGION_DESTROY(pGC->pScreen, prgnSrcClip);
        return NULL;
     }
 
-- 
1.6.1



More information about the xorg-devel mailing list