]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict: Fix potential timeout leak at deinit
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 6 Feb 2022 13:20:08 +0000 (14:20 +0100)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 22 Feb 2022 10:25:27 +0000 (11:25 +0100)
The deinit code could still trigger proctitle refresh.

src/dict/main.c

index bcf2bc7b60e28835865ee39fc7e88cef4e9ea3d3..14b1cea64fe9d2f0ff6b48a80ac80d69aa564149 100644 (file)
@@ -130,8 +130,6 @@ static void main_init(void)
 
 static void main_deinit(void)
 {
-       timeout_remove(&to_proctitle);
-
        /* wait for all dict operations to finish */
        dict_init_cache_wait_all();
        /* connections should no longer have any extra refcounts */
@@ -144,6 +142,7 @@ static void main_deinit(void)
        module_dir_unload(&modules);
 
        sql_drivers_deinit();
+       timeout_remove(&to_proctitle);
 }
 
 int main(int argc, char *argv[])