[Commits] [SCM] claws branch, master, updated. 3.16.0-143-g9af57a8

ticho at claws-mail.org ticho at claws-mail.org
Thu May 3 13:06:26 CEST 2018


The branch, master has been updated
       via  9af57a8c0c6d4908bc422596bc57cbf74ee6bf2f (commit)
      from  1714c7b4b559e9f6cb677fc76c21cb901aaf3342 (commit)

Summary of changes:
 src/plugins/managesieve/sieve_editor.c  |    1 +
 src/plugins/managesieve/sieve_manager.c |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 9af57a8c0c6d4908bc422596bc57cbf74ee6bf2f
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu May 3 13:05:46 2018 +0200

    Fix memory handling around SieveEditorPage.

diff --git a/src/plugins/managesieve/sieve_editor.c b/src/plugins/managesieve/sieve_editor.c
index d322652..f7793ad 100644
--- a/src/plugins/managesieve/sieve_editor.c
+++ b/src/plugins/managesieve/sieve_editor.c
@@ -415,6 +415,7 @@ static void sieve_editor_destroy(SieveEditorPage *page)
 {
 	gtk_widget_destroy(page->window);
 	undo_destroy(page->undostruct);
+	g_free(page->script_name);
 	g_free(page);
 }
 
diff --git a/src/plugins/managesieve/sieve_manager.c b/src/plugins/managesieve/sieve_manager.c
index 8a9af4c..0f7ec0e 100644
--- a/src/plugins/managesieve/sieve_manager.c
+++ b/src/plugins/managesieve/sieve_manager.c
@@ -198,13 +198,14 @@ static void filter_edit(GtkWidget *widget, SieveManagerPage *page)
 	editor = sieve_editor_get(session, filter_name);
 	if (editor) {
 		sieve_editor_present(editor);
+		g_free(filter_name);
 	} else {
 		editor = sieve_editor_new(session, filter_name);
+		/* filter_name becomes ownership of newly created
+		 * SieveEditorPage, so we do not need to free it here. */
 		sieve_editor_load(editor,
 			(sieve_session_cb_fn)filter_got_load_error, page);
 	}
-
-	g_free(filter_name);
 }
 
 static void filter_renamed(SieveSession *session, gboolean abort,

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list