[Commits] [SCM] claws branch, master, updated. 3.17.3-138-g94522bf

ticho at claws-mail.org ticho at claws-mail.org
Wed Mar 13 20:55:29 CET 2019


The branch, master has been updated
       via  94522bfdafad5e4d36bfadd65e626ca8540119fa (commit)
      from  8c9594c5e8783d2dbd4c27f4366a1bf398459e49 (commit)

Summary of changes:
 src/addrbook.c  |    5 ++---
 src/editgroup.c |    3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 94522bfdafad5e4d36bfadd65e626ca8540119fa
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Wed Mar 13 20:54:20 2019 +0100

    Fix two small memory leaks in addressbook code
    
    In each case, the GList structure itself was not
    being freed.

diff --git a/src/addrbook.c b/src/addrbook.c
index 8087996..296af5d 100644
--- a/src/addrbook.c
+++ b/src/addrbook.c
@@ -1606,7 +1606,7 @@ static void addrbook_build_avail_email_vis(gpointer key, gpointer value,
 /**
  * Return link list of available email items that have not already been linked
  * to groups. Note that the list contains references to items and should be
- * <code>g_free()</code> when done. Do <b>*NOT*</b> attempt to used the
+ * <code>g_list_free()</code> when done. Do <b>*NOT*</b> attempt to used the
  * <code>addrbook_free_xxx()<code> functions... this will destroy the
  * addressbook data!
  *
@@ -1672,8 +1672,7 @@ void addrbook_update_group_list(AddressBookFile *book, ItemGroup *group,
 	/* Remember old list */
 	oldData = group->listEMail;
 	group->listEMail = listEMail;
-	mgu_clear_list(oldData);
-	oldData = NULL;
+	g_list_free(oldData);
 }
 
 /**
diff --git a/src/editgroup.c b/src/editgroup.c
index 22f16a8..6571296 100644
--- a/src/editgroup.c
+++ b/src/editgroup.c
@@ -506,8 +506,7 @@ ItemGroup *addressbook_edit_group( AddressBookFile *abf, ItemFolder *parent, Ite
 
 	listEMail = addrbook_get_available_email_list( abf, group );
 	edit_group_load_clist( groupeditdlg.clist_avail, listEMail );
-	mgu_clear_list( listEMail );
-	listEMail = NULL;
+	g_list_free( listEMail );
 	gtk_cmclist_select_row( groupeditdlg.clist_group, 0, 0 );
 	gtk_cmclist_select_row( groupeditdlg.clist_avail, 0, 0 );
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list