From c6a6b65fb48d03a7b86deb2b5b9faff23896176b Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 18 Apr 2001 18:06:49 +0000 Subject: Don't need to dup the string: the relevant gnome-dialog routine already * session.c (request_callback): Don't need to dup the string: the relevant gnome-dialog routine already does. * message-list.c (message_list_destroy): Free the uid_nodemap. (hide_save_state): Free the filename when we're done. svn path=/trunk/; revision=9452 --- mail/ChangeLog | 8 ++++++++ mail/message-list.c | 8 ++++++++ mail/session.c | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 0d24ccf6d8..05ff8de138 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2001-04-18 Dan Winship + + * session.c (request_callback): Don't need to dup the string: the + relevant gnome-dialog routine already does. + + * message-list.c (message_list_destroy): Free the uid_nodemap. + (hide_save_state): Free the filename when we're done. + 2001-04-18 Jeffrey Stedfast * mail-callbacks.c (is_sent_folder): Implemented. diff --git a/mail/message-list.c b/mail/message-list.c index 39445a2be6..dc4eff7ef0 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -119,6 +119,8 @@ static void hide_load_state(MessageList *ml); /*static void mail_do_regenerate_messagelist (MessageList *list, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);*/ static void mail_regen_list(MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes); +static void clear_info(char *key, ETreePath *node, MessageList *ml); + enum { MESSAGE_SELECTED, LAST_SIGNAL @@ -1169,6 +1171,11 @@ message_list_destroy (GtkObject *object) message_list->hidden_pool = NULL; } + if (message_list->uid_nodemap) { + g_hash_table_foreach(message_list->uid_nodemap, (GHFunc)clear_info, message_list); + g_hash_table_destroy (message_list->uid_nodemap); + } + g_free(message_list->cursor_uid); g_mutex_free(message_list->hide_lock); @@ -2253,6 +2260,7 @@ static void hide_save_state(MessageList *ml) g_hash_table_foreach(ml->hidden, (GHFunc)hide_save_1, out); fclose(out); } + g_free (filename); MESSAGE_LIST_UNLOCK(ml, hide_lock); } diff --git a/mail/session.c b/mail/session.c index 42125c7b04..39d13ae5ca 100644 --- a/mail/session.c +++ b/mail/session.c @@ -46,7 +46,7 @@ request_callback (gchar *string, gpointer data) char **ans = data; if (string) - *ans = g_strdup(string); + *ans = string; else *ans = NULL; } -- cgit