From a903749b246fce26038c66d06fe7eb77daf815ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 10 Jul 2007 10:49:28 +0200 Subject: [PATCH] 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 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); -- 2.30.2