summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glx/glxconfig.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glx/glxconfig.c b/src/glx/glxconfig.c
index 555ccf8e62b..87a02fa9b6b 100644
--- a/src/glx/glxconfig.c
+++ b/src/glx/glxconfig.c
@@ -225,14 +225,13 @@ glx_config_create_list(unsigned count)
next = &base;
for (i = 0; i < count; i++) {
- *next = malloc(size);
+ *next = calloc(1, size);
if (*next == NULL) {
glx_config_destroy_list(base);
base = NULL;
break;
}
- (void) memset(*next, 0, size);
(*next)->visualID = GLX_DONT_CARE;
(*next)->visualType = GLX_DONT_CARE;
(*next)->visualRating = GLX_NONE;