From 0d7fafa0ed706a2053944e9b25068dfed6339a0c Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Fri, 7 Aug 2009 10:02:22 -0700 Subject: [PATCH] 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 --- src/mesa/drivers/dri/common/dri_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 1d940603fa8..e48e10d7c06 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; -- 2.30.2