Module: Mesa
Branch: master
Commit: 0d7fafa0ed706a2053944e9b25068dfed6339a0c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0d7fafa0ed706a2053944e9b25068dfed6339a0c

Author: Pauli Nieminen <[email protected]>
Date:   Fri Aug  7 10:02:22 2009 -0700

dri: Fix problems with unitialized values in dri screen object.

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 <[email protected]>

---

 src/mesa/drivers/dri/common/dri_util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index 1d94060..e48e10d 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -778,7 +778,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;
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to