From d18670b9228bf82a16c750f948784ce029dde857 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Wed, 17 Jan 2024 02:18:36 +0300 Subject: [PATCH] xwayland: close pipe fds on set_cloexec() error --- xwayland/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xwayland/server.c b/xwayland/server.c index fde3d610..6dd42246 100644 --- a/xwayland/server.c +++ b/xwayland/server.c @@ -358,6 +358,8 @@ static bool server_start(struct wlr_xwayland_server *server) { } if (!set_cloexec(notify_fd[0], true)) { wlr_log(WLR_ERROR, "Failed to set CLOEXEC on FD"); + close(notify_fd[0]); + close(notify_fd[1]); server_finish_process(server); return false; }