[evolution-patches] fix for bug #43406
- From: Jeffrey Stedfast <fejj ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] fix for bug #43406
- Date: 20 May 2003 15:58:46 -0400
don't free the object using the key's free func.
--
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com - www.ximian.com
? 43159.patch
? 43406.patch
? ChangeLog.nonximian
? body
? body.c
? body.txt
? camel-mime-filter-windows.c
? camel-mime-filter-windows.h
? charset-map.c
? charset-map.diff
? cmsutil.c
? date.patch
? debug.patch
? ehlo.patch
? evolution-1.3-gpg.patch
? folder-info-build.patch
? foo
? html-filter-broken.msg
? imap
? invalid-content-id.patch
? iso
? iso.c
? pop3-uidl.patch
? smime
? win-charset.patch
? tests/mime-filter/test-tohtml
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1818
diff -u -r1.1818 ChangeLog
--- ChangeLog 20 May 2003 15:59:54 -0000 1.1818
+++ ChangeLog 20 May 2003 19:46:12 -0000
@@ -1,3 +1,9 @@
+2003-05-20 Jeffrey Stedfast <fejj ximian com>
+
+ * camel-object.c (camel_object_bag_destroy): Create a second
+ GPtrArray for the keys. We don't want to use bag->free_key() on
+ the object. Fixes bug #43406.
+
2003-05-19 Jeffrey Stedfast <fejj ximian com>
* camel-folder-summary.c (camel_folder_summary_load): Only display
Index: camel-object.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-object.c,v
retrieving revision 1.32
diff -u -r1.32 camel-object.c
--- camel-object.c 23 Apr 2003 01:34:02 -0000 1.32
+++ camel-object.c 20 May 2003 19:46:13 -0000
@@ -1107,19 +1107,29 @@
g_ptr_array_add(objects, o);
}
+static void
+save_key(void *key, CamelObject *o, GPtrArray *keys)
+{
+ g_ptr_array_add (keys, key);
+}
+
void camel_object_bag_destroy(CamelObjectBag *bag)
{
- int i;
GPtrArray *objects = g_ptr_array_new();
+ GPtrArray *keys = g_ptr_array_new ();
+ int i;
sem_getvalue(&bag->reserve_sem, &i);
g_assert(i == 1);
g_hash_table_foreach(bag->object_table, (GHFunc)save_object, objects);
+ g_hash_table_foreach(bag->object_table, (GHFunc)save_key, keys);
for (i=0;i<objects->len;i++) {
camel_object_bag_remove(bag, objects->pdata[i]);
- bag->free_key(objects->pdata[i]);
+ bag->free_key (keys->pdata[i]);
}
+
+ g_ptr_array_free (keys, TRUE);
g_ptr_array_free(objects, TRUE);
g_hash_table_destroy(bag->object_table);
g_hash_table_destroy(bag->key_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]