glx: zero out drawable structs after allocation
This commit is contained in:
@@ -224,6 +224,7 @@ dri2CreateDrawable(__GLXscreenConfigs *base, XID xDrawable,
|
||||
if (!pdraw)
|
||||
return NULL;
|
||||
|
||||
memset(pdraw, 0, sizeof *pdraw);
|
||||
pdraw->base.destroyDrawable = dri2DestroyDrawable;
|
||||
pdraw->base.xDrawable = xDrawable;
|
||||
pdraw->base.drawable = drawable;
|
||||
|
||||
@@ -633,6 +633,7 @@ driCreateDrawable(__GLXscreenConfigs *base,
|
||||
if (!pdp)
|
||||
return NULL;
|
||||
|
||||
memset(pdp, 0, sizeof *pdp);
|
||||
pdp->base.drawable = drawable;
|
||||
pdp->base.psc = &psc->base;
|
||||
|
||||
|
||||
@@ -362,6 +362,7 @@ driCreateDrawable(__GLXscreenConfigs *base, XID xDrawable,
|
||||
if (!pdp)
|
||||
return NULL;
|
||||
|
||||
memset(pdp, 0, sizeof *pdp);
|
||||
pdp->base.xDrawable = xDrawable;
|
||||
pdp->base.drawable = drawable;
|
||||
pdp->base.psc = &psc->base;
|
||||
|
||||
Reference in New Issue
Block a user