diff -ru libsoup2.4-2.4.1/libsoup/soup-session-async.c libsoup2.4-2.4.1.patched/libsoup/soup-session-async.c
--- libsoup2.4-2.4.1/libsoup/soup-session-async.c	2008-04-04 13:03:58.000000000 +0000
+++ libsoup2.4-2.4.1.patched/libsoup/soup-session-async.c	2008-09-30 12:25:46.000000000 +0000
@@ -218,13 +218,9 @@
 static gboolean
 idle_run_queue (gpointer user_data)
 {
-	SoupSessionAsync *sa = user_data;
+	SoupSessionAsync *sa = user_data;
 
-	g_object_add_weak_pointer (G_OBJECT (sa), (gpointer)&sa);
-	g_object_unref (sa);
-
-	if (sa) {
-		g_object_remove_weak_pointer (G_OBJECT (sa), (gpointer)&sa);
+	if (!g_source_is_destroyed (g_main_current_source ())) {
 		run_queue (sa);
 	}
 	return FALSE;
@@ -234,7 +230,7 @@
 do_idle_run_queue (SoupSession *session)
 {
 	soup_add_idle (soup_session_get_async_context (session),
-		       idle_run_queue, g_object_ref (session));
+		       idle_run_queue, session);
 }
 
 static void
diff -ru libsoup2.4-2.4.1/tests/context-test.c libsoup2.4-2.4.1.patched/tests/context-test.c
--- libsoup2.4-2.4.1/tests/context-test.c	2008-09-30 11:44:45.000000000 +0000
+++ libsoup2.4-2.4.1.patched/tests/context-test.c	2008-09-30 12:11:35.000000000 +0000
@@ -241,6 +241,11 @@
 	g_object_unref (msg);
 
 	soup_session_abort (session);
+	if (G_OBJECT(session)->ref_count > 1) {
+		debug_printf (1, "   Session refcount is too high after abort: %u",
+			      G_OBJECT(session)->ref_count);
+		errors++;
+	}
 	g_object_unref (session);
 	g_free (uri);
 
