* Fixes NB#91356, fixes a couple of memory leaks
[modest] / src / modest-singletons.c
index 8b9ed7d..76f6ec1 100644 (file)
@@ -248,6 +248,12 @@ modest_singletons_finalize (GObject *obj)
                priv->plugin_factory = NULL;
        }
 
+       if (priv->protocol_registry) {
+               MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->protocol_registry,"");
+               g_object_unref (G_OBJECT(priv->protocol_registry));
+               priv->protocol_registry = NULL;
+       }
+
        /* It is important that the account manager is uninitialized after
         * the mail op queue is uninitialized because the mail op queue
         * cancells any mail operations which in turn access the account