Clear pointers to freed cliprects.
authorMichel Dänzer <michel@tungstengraphics.com>
Tue, 10 Jul 2007 08:49:28 +0000 (10:49 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Tue, 10 Jul 2007 09:05:41 +0000 (11:05 +0200)
Not doing this could lead to double frees under rare circumstances.

src/mesa/drivers/dri/common/dri_util.c

index dd52f7e915139458961190c6e2b9a29b5364278c..c30e66f1722c11b025b3ab3faa94f5155cb4fe1b 100644 (file)
@@ -428,10 +428,12 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
 
     if (pdp->pClipRects) {
        _mesa_free(pdp->pClipRects); 
+       pdp->pClipRects = NULL;
     }
 
     if (pdp->pBackClipRects) {
        _mesa_free(pdp->pBackClipRects); 
+       pdp->pBackClipRects = NULL;
     }
 
     DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);