From a7b8d0053558aafe0d838caed146bd66a2b0f1b2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 28 May 2021 09:29:27 +0300 Subject: [PATCH] (background_attention): don't use bad file descriptor. Found by Coverity. Coverity id #32593. Signed-off-by: Andrew Borodin --- src/background.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/background.c b/src/background.c index 584cd74ef..b5c64a5d0 100644 --- a/src/background.c +++ b/src/background.c @@ -281,10 +281,10 @@ background_attention (int fd, void *closure) if (to_child_fd == -1) message (D_ERROR, background_process_error, "%s", _("Unknown error in child")); - - /* Handle the call */ - if (type == Return_Integer) + else if (type == Return_Integer) { + /* Handle the call */ + int result = 0; if (have_ctx == 0)