mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xwayland: protect from memory allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -165,7 +165,8 @@ xwl_randr_request_lease(ClientPtr client, ScreenPtr screen, RRLeasePtr rrLease)
|
||||
|
||||
req = wp_drm_lease_device_v1_create_lease_request(
|
||||
lease_device->drm_lease_device);
|
||||
lease_private = calloc(1, sizeof(struct xwl_drm_lease));
|
||||
if (!(lease_private = calloc(1, sizeof(struct xwl_drm_lease))))
|
||||
return BadAlloc;
|
||||
for (i = 0; i < rrLease->numOutputs; ++i) {
|
||||
output = rrLease->outputs[i]->devPrivate;
|
||||
output->lease = lease_private;
|
||||
|
||||
Reference in New Issue
Block a user