Mesa (mesa_7_5_branch): dri: Fix problems with unitialized values in dri screen object.
Brian Paul
brianp at kemper.freedesktop.org
Fri Aug 7 17:25:28 UTC 2009
Module: Mesa
Branch: mesa_7_5_branch
Commit: d80b36f64f0a8224f2c73f3bab9b33d95c392158
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d80b36f64f0a8224f2c73f3bab9b33d95c392158
Author: Pauli Nieminen <suokkos at gmail.com>
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 <suokkos at gmail.com>
---
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 5764949..ecccc01 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -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;
More information about the mesa-commit
mailing list