]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: Destroy SSL module later in the atexit-callbacks.
authorTimo Sirainen <tss@iki.fi>
Thu, 30 Oct 2014 20:02:52 +0000 (22:02 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 30 Oct 2014 20:02:52 +0000 (22:02 +0200)
src/lib-ssl-iostream/iostream-ssl.c

index 0b54946f81f58d3d9ab438f9afac964212ecec93..6a2c0fc9ae9ba24df470c5dcfc70ed6696bdd4e1 100644 (file)
@@ -40,7 +40,10 @@ static int ssl_module_load(const char **error_r)
                return -1;
        }
 
-       lib_atexit(ssl_module_unload);
+       /* Destroy SSL module after (most of) the others. Especially lib-fs
+          backends may still want to access SSL module in their own
+          atexit-callbacks. */
+       lib_atexit_priority(ssl_module_unload, LIB_ATEXIT_PRIORITY_LOW);
        ssl_module_loaded = TRUE;
        return 0;
 #else