diff options
author | Vinson Lee <[email protected]> | 2009-11-24 00:57:55 -0500 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-11-24 00:57:55 -0500 |
commit | 364070b1f2b08d43fb205ec198894a35bec6b2f3 (patch) | |
tree | e476358f0b53cecf7e41abcfe8b96b5a72afda65 /src | |
parent | 960464e42dce138fde11c379ce7744bc4be14aa2 (diff) |
dri: Fix potential null pointer deference in dri_put_drawable.
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 e48e10d7c06..439f66a7b88 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) { |