projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cabd09c
)
glx: convert a malloc+memset to calloc
author
Adam Jackson
<ajax@redhat.com>
Wed, 14 Aug 2019 16:04:42 +0000
(12:04 -0400)
committer
Adam Jackson
<ajax@redhat.com>
Tue, 20 Aug 2019 18:04:59 +0000
(14:04 -0400)
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/glx/glxconfig.c
patch
|
blob
|
history
diff --git
a/src/glx/glxconfig.c
b/src/glx/glxconfig.c
index 555ccf8e62b6c2bfa1452543cf79dd197c58863b..87a02fa9b6bc8f75be9bd58388a349cc40330c27 100644
(file)
--- 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;