summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-07-23 21:45:05 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-07-23 22:05:53 -0400
commit6393a33944ec9983426cecd5f6c9f05ac089e1ae (patch)
treeca7bc3f53dae4c29f2e28415ac260f629dbda6af
parent6ec39db726beead21d97bf64ddbe1f0b2d2d6ca1 (diff)
glx: zero out drawable structs after allocation
-rw-r--r--src/glx/dri2_glx.c1
-rw-r--r--src/glx/dri_glx.c1
-rw-r--r--src/glx/drisw_glx.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 58f09ed86a..4a08f84de3 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -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;
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 95cded792d..d0f680de63 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -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;
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 4265f56412..852e56e484 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -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;