From a903749b246fce26038c66d06fe7eb77daf815ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 10 Jul 2007 10:49:28 +0200 Subject: Clear pointers to freed cliprects. Not doing this could lead to double frees under rare circumstances. --- src/mesa/drivers/dri/common/dri_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index dd52f7e915..c30e66f172 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); -- cgit v1.2.3