From: Marco Bettini Date: Wed, 9 Feb 2022 13:20:47 +0000 (+0100) Subject: doveadm: doveadm_who_iter_init() - Fix for handle leak on the fail path X-Git-Tag: 2.4.0~4468 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6637d89f4b315e69b728503c4b19e0cf89695ae9;p=thirdparty%2Fdovecot%2Fcore.git doveadm: doveadm_who_iter_init() - Fix for handle leak on the fail path --- diff --git a/src/doveadm/doveadm-who.c b/src/doveadm/doveadm-who.c index 4f58c0c878..36af858d6d 100644 --- a/src/doveadm/doveadm-who.c +++ b/src/doveadm/doveadm-who.c @@ -222,6 +222,7 @@ struct doveadm_who_iter *doveadm_who_iter_init(const char *anvil_path) net_set_nonblock(fd, FALSE); if (write(fd, ANVIL_CMD, strlen(ANVIL_CMD)) < 0) { i_error("write(%s) failed: %m", anvil_path); + i_close_fd(&fd); iter->failed = TRUE; return iter; }