diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-24 00:57:55 -0500 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-12-06 01:00:20 -0800 |
commit | f622b649fb0c55b1640997f9d32ea327743519a1 (patch) | |
tree | 41e90c7e6523ca4f7213ed14d84ddb2e0322ed9d /src | |
parent | 76b3523d752968bc552d4350a39b9b9b1a023cf0 (diff) | |
download | external_mesa3d-f622b649fb0c55b1640997f9d32ea327743519a1.zip external_mesa3d-f622b649fb0c55b1640997f9d32ea327743519a1.tar.gz external_mesa3d-f622b649fb0c55b1640997f9d32ea327743519a1.tar.bz2 |
dri: Fix potential null pointer deference in dri_put_drawable.
(cherry picked from commit 364070b1f2b08d43fb205ec198894a35bec6b2f3)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index e48e10d..439f66a 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -498,11 +498,11 @@ static void dri_put_drawable(__DRIdrawable *pdp) { __DRIscreenPrivate *psp; - pdp->refcount--; - if (pdp->refcount) - return; - if (pdp) { + pdp->refcount--; + if (pdp->refcount) + return; + psp = pdp->driScreenPriv; (*psp->DriverAPI.DestroyBuffer)(pdp); if (pdp->pClipRects) { |