summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-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 87d62ad846..3ce410d9be 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 35bbd9151c..5e3d763cff 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;