From e7a50079ed90bd9f9f292d3f40ed3905c034a4cc Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 28 Feb 2019 23:15:22 +0100 Subject: xfixes: use calloc for some structs Attributes ArcticaProject/nx-libs#382 --- nx-X11/programs/Xserver/xfixes/cursor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c index 8f258e32f..fc4c1d803 100644 --- a/nx-X11/programs/Xserver/xfixes/cursor.c +++ b/nx-X11/programs/Xserver/xfixes/cursor.c @@ -201,7 +201,7 @@ XFixesSelectCursorInput (ClientPtr pClient, } if (!e) { - e = (CursorEventPtr) malloc (sizeof (CursorEventRec)); + e = (CursorEventPtr) calloc (1, sizeof (CursorEventRec)); if (!e) return BadAlloc; @@ -759,7 +759,7 @@ createCursorHideCount (ClientPtr pClient, ScreenPtr pScreen) CursorScreenPtr cs = GetCursorScreen(pScreen); CursorHideCountPtr pChc; - pChc = (CursorHideCountPtr) malloc(sizeof(CursorHideCountRec)); + pChc = (CursorHideCountPtr) calloc(1, sizeof(CursorHideCountRec)); if (pChc == NULL) { return BadAlloc; } -- cgit v1.2.3