diff -ur glib-2.37.5/gio/gsocketclient.c glib-2.37.5_good/gio/gsocketclient.c
--- glib-2.37.5/gio/gsocketclient.c	2013-06-30 04:20:49.000000000 +0200
+++ glib-2.37.5_good/gio/gsocketclient.c	2013-09-15 12:43:01.000000000 +0200
@@ -1610,8 +1610,10 @@
   GSocket *socket;
   GError *error = NULL;
 
-  if (g_task_return_error_if_cancelled (data->task))
+  if (g_task_return_error_if_cancelled (data->task)) {
+    g_object_unref (data->task);
     return;
+  }
 
   address = g_socket_address_enumerator_next_finish (data->enumerator,
 						     result, &error);
