diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 0a24bfd13..4585bdcdf 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -229,11 +229,10 @@ XFixesSelectCursorInput(ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask) return Success; } if (!e) { - e = (CursorEventPtr) malloc(sizeof(CursorEventRec)); + e = (CursorEventPtr) calloc(1, sizeof(CursorEventRec)); if (!e) return BadAlloc; - e->next = 0; e->pClient = pClient; e->pWindow = pWindow; e->clientResource = FakeClientID(pClient->index);