summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-05-04 08:34:20 -0600
committerBrian Paul <brianp@vmware.com>2009-06-17 11:30:02 -0600
commit199c80c6667737ef4cbb9e3cd6a737e4d7c8e85a (patch)
tree8b047af0768ae5eb2a88487bacb084f006cbf14a /src
parent268f43a5fb100951b75fc6180e72ba5157898a6e (diff)
glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton. (cherry picked from commit dd4c142e90a0cba5b445990bb522ce9199d7f565)
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/dri_glx.c2
-rw-r--r--src/glx/x11/drisw_glx.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index 3089aa17285..372d9d9fc9e 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -600,7 +600,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;