From 65f72f5dbbb2cd9c75b8ebca96f0e92d4a8e8b4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 2 Feb 2026 15:16:10 +0100 Subject: [PATCH] ask-password: remove files in /run when query is aborted Because of the missing 'goto', if the query was aborted, we would leave behind the ask.* ini file. --- src/shared/ask-password-api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index b8602eee788..57536688005 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -1004,8 +1004,10 @@ int ask_password_agent( goto finish; } - if (req->hup_fd >= 0 && pollfd[hup_fd_idx].revents & POLLHUP) - return -ECONNRESET; + if (req->hup_fd >= 0 && pollfd[hup_fd_idx].revents & POLLHUP) { + r = -ECONNRESET; + goto finish; + } if (inotify_fd >= 0 && pollfd[inotify_idx].revents != 0) { (void) flush_fd(inotify_fd); -- 2.47.3