]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Fix fd leak check at startup with DEBUG
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Feb 2023 11:26:25 +0000 (13:26 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Feb 2023 15:30:46 +0000 (15:30 +0000)
Don't fail at startup because config fd is set.

Broken by 9280367fdb767d9248dd9a3713519ee3cdad6b3f

src/master/main.c

index 0cfd1734c6af03a12d5d5982842f8cc20c9fddf1..3ff4c8274feafc1c521369f8345c54a08b51552f 100644 (file)
@@ -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.. */