[evolution-patches] lets see the fix for bug #43406 in an instant-replay.



My last patch was wrong, I somehow missed that camel_object_bag_remove()
free'd the key (which makes complete sense now that I think about it).
So, the real fix boiled down to simply removing the line:

bag->key_free (objects->pdata[i]);

patch for current CVS attached (which means undoing my last fix).

Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
? 43406-again.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.1819
diff -u -r1.1819 ChangeLog
--- ChangeLog	21 May 2003 15:32:36 -0000	1.1819
+++ ChangeLog	22 May 2003 19:43:20 -0000
@@ -1,3 +1,10 @@
+2003-05-22  Jeffrey Stedfast  <fejj ximian com>
+
+	* camel-object.c (camel_object_bag_destroy): Lets try this
+	again. We don't actually want to free the key here, because
+	camel_object_bag_remove() does that for us. This should fix bug
+	#43406 properly.
+
 2003-05-20  Jeffrey Stedfast  <fejj ximian com>
 
 	* camel-object.c (camel_object_bag_destroy): Create a second
Index: camel-object.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-object.c,v
retrieving revision 1.33
diff -u -r1.33 camel-object.c
--- camel-object.c	21 May 2003 15:32:37 -0000	1.33
+++ camel-object.c	22 May 2003 19:43:20 -0000
@@ -1107,29 +1107,18 @@
 	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)
 {
 	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++) {
+	for (i=0;i<objects->len;i++)
 		camel_object_bag_remove(bag, 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]