projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76b3523
)
dri: Fix potential null pointer deference in dri_put_drawable.
author
Vinson Lee
<vlee@vmware.com>
Tue, 24 Nov 2009 05:57:55 +0000
(
00:57
-0500)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 6 Dec 2009 09:00:20 +0000
(
01:00
-0800)
(cherry picked from commit
364070b1f2b08d43fb205ec198894a35bec6b2f3
)
src/mesa/drivers/dri/common/dri_util.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/common/dri_util.c
b/src/mesa/drivers/dri/common/dri_util.c
index e48e10d7c061f6e73ea70cbf4bcbe689e92e2ef9..439f66a7b882de1c996b1ea271c84e129788a6c0 100644
(file)
--- 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) {