From: Timo Sirainen Date: Thu, 11 Jul 2019 09:05:37 +0000 (+0300) Subject: dict: Unref dict connection immediately when connection is destroyed X-Git-Tag: 2.3.17~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cf237588b8cf9eb0bd9e07f0c8c1c2e80487264;p=thirdparty%2Fdovecot%2Fcore.git dict: Unref dict connection immediately when connection is destroyed The delayed unrefing is needed when calling from dict command callbacks to avoid calling dict_deinit() too early. But the connection's destroy() vfunc can't be called directly from dict command callbacks, so there's no need to add further delays. Especially when this happens at deinit where there is no possibility of calling the delayed callback anymore. --- diff --git a/src/dict/dict-connection.c b/src/dict/dict-connection.c index b23272532e..6a87c27146 100644 --- a/src/dict/dict-connection.c +++ b/src/dict/dict-connection.c @@ -240,7 +240,7 @@ static void dict_connection_destroy(struct connection *_conn) dict_connection_cmds_output_more(conn); io_remove(&conn->conn.io); - dict_connection_unref_safe(conn); + dict_connection_unref(conn); } unsigned int dict_connections_current_count(void)