From: Brian Paul Date: Mon, 4 May 2009 13:52:55 +0000 (-0600) Subject: glx: replace Xmalloc() calls with Xcalloc() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd4c142e90a0cba5b445990bb522ce9199d7f565;p=mesa.git glx: replace Xmalloc() calls with Xcalloc() Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton. --- diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 87d62ad8468..3ce410d9be3 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -614,7 +614,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen, char *driverName; int i; - psp = Xmalloc(sizeof *psp); + psp = Xcalloc(1, sizeof *psp); if (psp == NULL) return NULL; diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index 35bbd9151ca..5e3d763cff5 100644 --- a/src/glx/x11/drisw_glx.c +++ b/src/glx/x11/drisw_glx.c @@ -359,7 +359,7 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen, const char *driverName = "swrast"; int i; - psp = Xmalloc(sizeof *psp); + psp = Xcalloc(1, sizeof *psp); if (psp == NULL) return NULL;