diff --git a/Xi/getprop.c b/Xi/getprop.c index b744f35cb..b53db7306 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -119,6 +119,8 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) if (count) { rep.count = count; buf = xallocarray(rep.count, sizeof(XEventClass)); + if (buf == NULL) + return BadAlloc; rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); tbuf = buf;