summaryrefslogtreecommitdiff
path: root/tests/modetest/buffers.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modetest/buffers.c')
-rw-r--r--tests/modetest/buffers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 7e214e85..0b09cfc3 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -1022,7 +1022,7 @@ bo_create_dumb(int fd, unsigned int width, unsigned int height, unsigned int bpp
struct bo *bo;
int ret;
- bo = malloc(sizeof(*bo));
+ bo = calloc(1, sizeof(*bo));
if (bo == NULL) {
fprintf(stderr, "failed to allocate buffer object\n");
return NULL;