From: Timo Sirainen Date: Thu, 30 Oct 2014 20:02:52 +0000 (+0200) Subject: lib-ssl-iostream: Destroy SSL module later in the atexit-callbacks. X-Git-Tag: 2.2.16.rc1~258 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0aaded8049bed0a277e980ffdbd5712c509a21e5;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: Destroy SSL module later in the atexit-callbacks. --- diff --git a/src/lib-ssl-iostream/iostream-ssl.c b/src/lib-ssl-iostream/iostream-ssl.c index 0b54946f81..6a2c0fc9ae 100644 --- a/src/lib-ssl-iostream/iostream-ssl.c +++ b/src/lib-ssl-iostream/iostream-ssl.c @@ -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