[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-314-g5be9de249

wwp at claws-mail.org wwp at claws-mail.org
Tue Oct 5 13:02:33 CEST 2021


The branch, gtk3 has been updated
       via  5be9de249eba2821756096e22fef386b33b2f94e (commit)
      from  224f1e26f81bbf5f984f43ff5f48045c00f6350d (commit)

Summary of changes:
 src/addressbook.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 5be9de249eba2821756096e22fef386b33b2f94e
Author: wwp <subscript at free.fr>
Date:   Tue Oct 5 13:02:17 2021 +0200

    Fix CID 1492192: resource leak.

diff --git a/src/addressbook.c b/src/addressbook.c
index a66c8030d..d7ea12425 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -4406,7 +4406,6 @@ static GtkCMCTreeNode *addressbook_node_add_folder(
 {
 	GtkCMCTree *ctree = GTK_CMCTREE(addrbook.ctree);
 	GtkCMCTreeNode *newNode = NULL;
-	AdapterFolder *adapter;
 	AddressTypeControlItem *atci = NULL;
 	GList *listItems = NULL;
 	gchar *name;
@@ -4431,7 +4430,7 @@ static GtkCMCTreeNode *addressbook_node_add_folder(
 		newNode = node;
 	}
 	else {
-		adapter = g_new0( AdapterFolder, 1 );
+		AdapterFolder *adapter = g_new0( AdapterFolder, 1 );
 		ADDRESS_OBJECT_TYPE(adapter) = ADDR_ITEM_FOLDER;
 		ADDRESS_OBJECT_NAME(adapter) = g_strdup( ADDRITEM_NAME(itemFolder) );
 		adapter->itemFolder = itemFolder;
@@ -4443,6 +4442,8 @@ static GtkCMCTreeNode *addressbook_node_add_folder(
 		if( newNode ) {
 			gtk_cmctree_node_set_row_data_full( ctree, newNode, adapter,
 				addressbook_free_treenode );
+		} else {
+			addrbookctl_free_folder(adapter);
 		}
 	}
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list