From: Pauli Nieminen Date: Fri, 7 Aug 2009 17:02:22 +0000 (-0700) Subject: dri: Fix problems with unitialized values in dri screen object. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d7fafa0ed706a2053944e9b25068dfed6339a0c;p=mesa.git 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 --- 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;