diff options
-rw-r--r-- | backend/drm/drm.c | 2 | ||||
-rw-r--r-- | render/allocator/allocator.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 43de54e5..2b573295 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1629,7 +1629,7 @@ struct wlr_drm_lease *wlr_drm_create_lease(struct wlr_output **outputs, wl_signal_init(&lease->events.destroy); wlr_log(WLR_DEBUG, "Issuing DRM lease with %d objects", n_objects); - int lease_fd = drmModeCreateLease(drm->fd, objects, n_objects, 0, + int lease_fd = drmModeCreateLease(drm->fd, objects, n_objects, O_CLOEXEC, &lease->lessee_id); if (lease_fd < 0) { free(lease); diff --git a/render/allocator/allocator.c b/render/allocator/allocator.c index 0597cf25..2c75421f 100644 --- a/render/allocator/allocator.c +++ b/render/allocator/allocator.c @@ -30,7 +30,7 @@ static int reopen_drm_node(int drm_fd, bool allow_render_node) { if (drmIsMaster(drm_fd)) { // Only recent kernels support empty leases uint32_t lessee_id; - int lease_fd = drmModeCreateLease(drm_fd, NULL, 0, 0, &lessee_id); + int lease_fd = drmModeCreateLease(drm_fd, NULL, 0, O_CLOEXEC, &lessee_id); if (lease_fd >= 0) { return lease_fd; } else if (lease_fd != -EINVAL && lease_fd != -EOPNOTSUPP) { |