Commit e7a50079 authored by Ulrich Sibiller's avatar Ulrich Sibiller

xfixes: use calloc for some structs

Attributes ArcticaProject/nx-libs#382
parent c6b6a8fc
...@@ -201,7 +201,7 @@ XFixesSelectCursorInput (ClientPtr pClient, ...@@ -201,7 +201,7 @@ XFixesSelectCursorInput (ClientPtr pClient,
} }
if (!e) if (!e)
{ {
e = (CursorEventPtr) malloc (sizeof (CursorEventRec)); e = (CursorEventPtr) calloc (1, sizeof (CursorEventRec));
if (!e) if (!e)
return BadAlloc; return BadAlloc;
...@@ -759,7 +759,7 @@ createCursorHideCount (ClientPtr pClient, ScreenPtr pScreen) ...@@ -759,7 +759,7 @@ createCursorHideCount (ClientPtr pClient, ScreenPtr pScreen)
CursorScreenPtr cs = GetCursorScreen(pScreen); CursorScreenPtr cs = GetCursorScreen(pScreen);
CursorHideCountPtr pChc; CursorHideCountPtr pChc;
pChc = (CursorHideCountPtr) malloc(sizeof(CursorHideCountRec)); pChc = (CursorHideCountPtr) calloc(1, sizeof(CursorHideCountRec));
if (pChc == NULL) { if (pChc == NULL) {
return BadAlloc; return BadAlloc;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment