aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSamuel Čavoj <samuel@cavoj.net>2022-03-13 12:28:55 +0100
committerSamuel Čavoj <samuel@cavoj.net>2022-03-13 13:28:48 +0100
commit5c17452ae008d001b2529a6437916ea17403588d (patch)
treea85dcbad13ae773f6575be7ceccbee426e46a94a /backend/drm
parent4c8ecfcd4ab84d67a0677967d1fc98d5062ab6ae (diff)
Pass O_CLOEXEC to drmModeCreateLease calls
The lease_fd is currently being leaked to child processes Link: https://github.com/swaywm/sway/issues/4286#issuecomment-1065987957
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c2
1 files changed, 1 insertions, 1 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);