[Commits] [SCM] claws branch, master, updated. 3.18.0-201-g00d8211ca
wwp at claws-mail.org
wwp at claws-mail.org
Wed Sep 29 12:37:45 CEST 2021
The branch, master has been updated
via 00d8211caa63bdb27e881c063f7684e88594e47e (commit)
from c2c10908d30cc88974e99760aad1358d5e3f9284 (commit)
Summary of changes:
src/plugins/managesieve/managesieve.c | 5 +++++
1 file changed, 5 insertions(+)
- Log -----------------------------------------------------------------
commit 00d8211caa63bdb27e881c063f7684e88594e47e
Author: wwp <subscript at free.fr>
Date: Wed Sep 29 12:37:00 2021 +0200
Fix resource leak: we were never freeing session's config.
diff --git a/src/plugins/managesieve/managesieve.c b/src/plugins/managesieve/managesieve.c
index ba5ac50f3..a2fb33429 100644
--- a/src/plugins/managesieve/managesieve.c
+++ b/src/plugins/managesieve/managesieve.c
@@ -984,6 +984,8 @@ static void sieve_session_destroy(Session *session)
sessions = g_slist_remove(sessions, (gconstpointer)session);
g_slist_free_full(sieve_session->send_queue,
(GDestroyNotify)command_abort);
+ if (sieve_session->config)
+ sieve_prefs_account_free_config(sieve_session->config);
}
static void sieve_connect_finished(Session *session, gboolean success)
@@ -1036,6 +1038,7 @@ static SieveSession *sieve_session_new(PrefsAccount *account)
SESSION(session)->connect_finished = sieve_connect_finished;
session_set_recv_message_notify(SESSION(session), sieve_recv_message, NULL);
+ session->config = NULL;
sieve_session_reset(session);
return session;
}
@@ -1062,6 +1065,8 @@ static void sieve_session_reset(SieveSession *session)
#endif
session->avail_auth_type = 0;
session->auth_type = 0;
+ if (session->config)
+ sieve_prefs_account_free_config(session->config);
session->config = config;
session->host = config->use_host ? config->host : account->recv_server;
session->port = config->use_port ? config->port : SIEVE_PORT;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list