From: Michel Dänzer Date: Tue, 10 Jul 2007 08:49:28 +0000 (+0200) Subject: Clear pointers to freed cliprects. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a903749b246fce26038c66d06fe7eb77daf815ab;p=mesa.git Clear pointers to freed cliprects. Not doing this could lead to double frees under rare circumstances. --- diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index dd52f7e9151..c30e66f1722 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -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);