dri: Fix potential null pointer deference in dri_put_drawable.
(cherry picked from commit 364070b1f2)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user