devPrivates rework: zero out newly allocated private space.
This commit is contained in:
parent
327bc332a6
commit
353e19fd5e
|
@ -107,7 +107,7 @@ dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key)
|
||||||
if (item)
|
if (item)
|
||||||
size += item->size;
|
size += item->size;
|
||||||
|
|
||||||
ptr = (PrivateRec *)xalloc(size);
|
ptr = (PrivateRec *)xcalloc(size, 1);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return NULL;
|
return NULL;
|
||||||
ptr->key = key;
|
ptr->key = key;
|
||||||
|
|
Loading…
Reference in New Issue