Browse Source

glx: zero out drawable structs after allocation

tags/mesa-7.9-rc1
Kristian Høgsberg 15 years ago
parent
commit
6393a33944
3 changed files with 3 additions and 0 deletions
  1. 1
    0
      src/glx/dri2_glx.c
  2. 1
    0
      src/glx/dri_glx.c
  3. 1
    0
      src/glx/drisw_glx.c

+ 1
- 0
src/glx/dri2_glx.c View File

if (!pdraw) if (!pdraw)
return NULL; return NULL;


memset(pdraw, 0, sizeof *pdraw);
pdraw->base.destroyDrawable = dri2DestroyDrawable; pdraw->base.destroyDrawable = dri2DestroyDrawable;
pdraw->base.xDrawable = xDrawable; pdraw->base.xDrawable = xDrawable;
pdraw->base.drawable = drawable; pdraw->base.drawable = drawable;

+ 1
- 0
src/glx/dri_glx.c View File

if (!pdp) if (!pdp)
return NULL; return NULL;


memset(pdp, 0, sizeof *pdp);
pdp->base.drawable = drawable; pdp->base.drawable = drawable;
pdp->base.psc = &psc->base; pdp->base.psc = &psc->base;



+ 1
- 0
src/glx/drisw_glx.c View File

if (!pdp) if (!pdp)
return NULL; return NULL;


memset(pdp, 0, sizeof *pdp);
pdp->base.xDrawable = xDrawable; pdp->base.xDrawable = xDrawable;
pdp->base.drawable = drawable; pdp->base.drawable = drawable;
pdp->base.psc = &psc->base; pdp->base.psc = &psc->base;

Loading…
Cancel
Save