dri: Fix problems with unitialized values in dri screen object.
authorPauli Nieminen <suokkos@gmail.com>
Fri, 7 Aug 2009 17:02:22 +0000 (10:02 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 7 Aug 2009 17:24:47 +0000 (11:24 -0600)
This fixes crash in r200 KMS driver when pSAREA was set to 1 randomly because of memory wasn't cleared.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
src/mesa/drivers/dri/common/dri_util.c

index 576494940f38f5eedcadf3aacbc28f8b8b7b2fcd..ecccc0100091d4f7d5136f28b74a76dc8b0e8044 100644 (file)
@@ -763,7 +763,7 @@ dri2CreateNewScreen(int scrn, int fd,
     if (driDriverAPI.InitScreen2 == NULL)
         return NULL;
 
-    psp = _mesa_malloc(sizeof(*psp));
+    psp = _mesa_calloc(sizeof(*psp));
     if (!psp)
        return NULL;