From: Timo Sirainen Date: Wed, 1 Feb 2023 11:26:25 +0000 (+0200) Subject: master: Fix fd leak check at startup with DEBUG X-Git-Tag: 2.4.0~3013 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f063cd770822f29ebdc3503d849371c56ae18da;p=thirdparty%2Fdovecot%2Fcore.git master: Fix fd leak check at startup with DEBUG Don't fail at startup because config fd is set. Broken by 9280367fdb767d9248dd9a3713519ee3cdad6b3f --- diff --git a/src/master/main.c b/src/master/main.c index 0cfd1734c6..3ff4c8274f 100644 --- a/src/master/main.c +++ b/src/master/main.c @@ -790,8 +790,10 @@ int main(int argc, char *argv[]) int i, c; #ifdef DEBUG - if (getenv("GDB") == NULL) - fd_debug_verify_leaks(3, 1024); + if (getenv("GDB") == NULL) { + fd_debug_verify_leaks(3, MASTER_CONFIG_FD - 1); + fd_debug_verify_leaks(MASTER_CONFIG_FD + 1, 1024); + } #endif /* drop -- prefix from all --args. ugly, but the only way that it works with standard getopt() in all OSes.. */