[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-259-g45c87cf44

wwp at claws-mail.org wwp at claws-mail.org
Wed Sep 29 12:37:49 CEST 2021


The branch, gtk3 has been updated
       via  45c87cf44dae2b33714bf7af487fb07fbc099bff (commit)
      from  e63d58c5305a291b7c538041ec843bc2fdc9ce17 (commit)

Summary of changes:
 src/plugins/managesieve/managesieve.c | 5 +++++
 1 file changed, 5 insertions(+)


- Log -----------------------------------------------------------------
commit 45c87cf44dae2b33714bf7af487fb07fbc099bff
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