[Commits] [SCM] claws branch, master, updated. 3.17.3-137-g8c9594c
ticho at claws-mail.org
ticho at claws-mail.org
Wed Mar 13 20:22:45 CET 2019
The branch, master has been updated
via 8c9594c5e8783d2dbd4c27f4366a1bf398459e49 (commit)
from cd9afd9b09881c116c7b932c2bd4643c96d0729f (commit)
Summary of changes:
src/common/mgutils.c | 12 ------------
src/common/mgutils.h | 1 -
src/pine.c | 6 ++----
3 files changed, 2 insertions(+), 17 deletions(-)
- Log -----------------------------------------------------------------
commit 8c9594c5e8783d2dbd4c27f4366a1bf398459e49
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Wed Mar 13 20:19:59 2019 +0100
Fix a memory leak in Pine address book support
Also removed mgu_clear_slist(), since it is not
used anywhere anymore.
diff --git a/src/common/mgutils.c b/src/common/mgutils.c
index cbb5761..e15207b 100644
--- a/src/common/mgutils.c
+++ b/src/common/mgutils.c
@@ -137,18 +137,6 @@ gchar *mgu_replace_string( gchar *str, const gchar *value ) {
* Clear a linked list by setting node data pointers to NULL. Note that
* items are not freed.
*/
-void mgu_clear_slist( GSList *list ) {
- GSList *node = list;
- while( node ) {
- node->data = NULL;
- node = g_slist_next( node );
- }
-}
-
-/*
-* Clear a linked list by setting node data pointers to NULL. Note that
-* items are not freed.
-*/
void mgu_clear_list( GList *list ) {
GList *node = list;
while( node ) {
diff --git a/src/common/mgutils.h b/src/common/mgutils.h
index 574c980..15555362 100644
--- a/src/common/mgutils.h
+++ b/src/common/mgutils.h
@@ -47,7 +47,6 @@ void mgu_free_list ( GSList *list );
void mgu_free_dlist ( GList *list );
gchar *mgu_list_coalesce ( GSList *list );
gchar *mgu_replace_string ( gchar *str, const gchar *value );
-void mgu_clear_slist ( GSList *list );
void mgu_clear_list ( GList *list );
gchar *mgu_email_check_empty ( gchar *address );
GList *mgu_parse_string ( gchar *line, const gint maxTokens,
diff --git a/src/pine.c b/src/pine.c
index 20944d0..19e2525 100644
--- a/src/pine.c
+++ b/src/pine.c
@@ -195,10 +195,8 @@ static void pine_free_rec( Pine_ParsedRec *rec ) {
g_free( rec->address );
g_free( rec->fcc );
g_free( rec->comments );
- mgu_clear_slist( rec->listName );
- mgu_clear_slist( rec->listAddr );
- g_slist_free( rec->listName );
- g_slist_free( rec->listAddr );
+ g_slist_free_full( rec->listName, g_free );
+ g_slist_free_full( rec->listAddr, g_free );
rec->nickName = NULL;
rec->name = NULL;
rec->address = NULL;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list