[evolution-data-server/gnome-3-6] Workaround file description leak from e_source_registry_authenticate_sync()



commit 4250cb962167ee0797ee86dbe03b4a835a819a46
Author: Milan Crha <mcrha redhat com>
Date:   Wed Dec 12 23:28:14 2012 +0100

    Workaround file description leak from e_source_registry_authenticate_sync()
    
    This workarounds a file descriptor leak (a GMainContext leak) partly
    caused by GDBusConnection. See bug #690126 for more details:
    https://bugzilla.gnome.org/show_bug.cgi?id=690126

 libedataserver/e-source-registry.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c
index 3b18a09..681754b 100644
--- a/libedataserver/e-source-registry.c
+++ b/libedataserver/e-source-registry.c
@@ -1730,6 +1730,12 @@ e_source_registry_authenticate_sync (ESourceRegistry *registry,
 
 exit:
 	g_main_context_pop_thread_default (main_context);
+
+	/* Make sure the main_context doesn't have pending operations;
+	   workarounds https://bugzilla.gnome.org/show_bug.cgi?id=690126 */
+	while (g_main_context_pending (main_context))
+		g_main_context_iteration (main_context, FALSE);
+
 	g_main_context_unref (main_context);
 
 	return success;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]