From 61fae09dc0157bde0e1853a788c200e6830978a7 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 4 Aug 2000 04:04:11 +0000 Subject: Fix a possible crash when using the quicksearch by freeing the UID array correctly. svn path=/trunk/; revision=4525 --- mail/ChangeLog | 5 +++++ mail/message-list.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 543655d21f..4366a088d4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2000-08-04 Ettore Perazzoli + + * message-list.c (message_list_regenerate): Free the GPtrArray + correctly instead of using `g_strfreev()'. + 2000-08-04 Michael Meeks * folder-browser-factory.c (control_activate): release the ui_handler diff --git a/mail/message-list.c b/mail/message-list.c index f2565866d4..91a177ffc4 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -850,10 +850,14 @@ message_list_regenerate (MessageList *message_list, const char *search) build_flat (message_list, message_list->tree_root, uids); if (search) { - g_strfreev ((char **)uids->pdata); - g_ptr_array_free (uids, FALSE); - } else + int i; + + for (i = 0; i < uids->len; i++) + g_free (g_ptr_array_index (uids, i)); + g_ptr_array_free (uids, TRUE); + } else { camel_folder_free_uids (message_list->folder, uids); + } e_table_model_changed (message_list->table_model); select_msg (message_list, 0); -- cgit v1.2.3