diff --git a/Xi/getprop.c b/Xi/getprop.c index 5ef20373f..7249266bc 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -116,7 +116,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); if (count) { rep.count = count; - buf = xallocarray(rep.count, sizeof(XEventClass)); + buf = calloc(rep.count, sizeof(XEventClass)); rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); tbuf = buf; diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 55c52addb..2691a8935 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -222,7 +222,7 @@ list_atoms(DeviceIntPtr dev, int *natoms, Atom **atoms_return) if (nprops) { Atom *a; - atoms = xallocarray(nprops, sizeof(Atom)); + atoms = calloc(nprops, sizeof(Atom)); if (!atoms) return BadAlloc; a = atoms; @@ -723,7 +723,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, if (mode == PropModeReplace || len > 0) { void *new_data = NULL, *old_data = NULL; - new_value.data = xallocarray(total_len, size_in_bytes); + new_value.data = calloc(total_len, size_in_bytes); if (!new_value.data && total_len && size_in_bytes) { if (add) XIDestroyDeviceProperty(prop);