[glib] GApplication: fix leaked object path



commit 53389d963d1271d0c36862e2b4866ff5231b9b9e
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Apr 10 07:50:26 2011 -0400

    GApplication: fix leaked object path
    
    In the case that we fail to become the primary instance we should
    unregister *both* object paths that we registered during our attempt.

 gio/gapplicationimpl-dbus.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c
index 406b839..c59c90e 100644
--- a/gio/gapplicationimpl-dbus.c
+++ b/gio/gapplicationimpl-dbus.c
@@ -659,6 +659,9 @@ g_application_impl_register (GApplication       *application,
       g_dbus_connection_unregister_object (impl->session_bus,
                                            impl->object_id);
       impl->object_id = 0;
+      g_dbus_connection_unregister_object (impl->session_bus,
+                                           impl->action_id);
+      impl->action_id = 0;
 
       if (flags & G_APPLICATION_IS_SERVICE)
         {



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