Zero out bufmgr_fake on alloc.
authorEric Anholt <eric@anholt.net>
Fri, 18 May 2007 19:39:00 +0000 (12:39 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 18 May 2007 19:39:00 +0000 (12:39 -0700)
src/mesa/drivers/dri/common/dri_bufmgr_fake.c

index 914410e4bab6380e7e6bf7c71c8fc6c99c3fe3c2..191e16af616d6df3691ecba9d8d3332cc03eae9f 100644 (file)
@@ -837,7 +837,7 @@ dri_bufmgr_fake_init(unsigned long low_offset, void *low_virtual,
 {
    dri_bufmgr_fake *bufmgr_fake;
 
-   bufmgr_fake = malloc(sizeof(*bufmgr_fake));
+   bufmgr_fake = calloc(1, sizeof(*bufmgr_fake));
 
    /* Initialize allocator */
    make_empty_list(&bufmgr_fake->referenced);