diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-04 08:34:20 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-04 08:34:20 -0600 |
commit | e9d5569bf3e5d7a78a790c144aed275f1a32f325 (patch) | |
tree | 2708cb9342b6b332b174fd02e627e97cd4117465 | |
parent | 63375254979be322736fd3ea1c692c6ab08e817b (diff) | |
download | mesa-e9d5569bf3e5d7a78a790c144aed275f1a32f325.tar.gz |
glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton.
(cherry picked from commit dd4c142e90a0cba5b445990bb522ce9199d7f565)
-rw-r--r-- | src/glx/x11/dri_glx.c | 2 | ||||
-rw-r--r-- | src/glx/x11/drisw_glx.c | 2 |
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; |