void cockpit_polkit_agent_unregister (gpointer handle) { guint handler = 0; /* Everything is shutting down at this point, prevent polkit from complaining */ handler = g_log_set_handler (NULL, G_LOG_LEVEL_WARNING, cockpit_null_log_handler, NULL); if (handle) polkit_agent_listener_unregister (handle); g_log_remove_handler (NULL, handler); }
static void nm_polkit_listener_finalize (GObject *object) { NMPolkitListenerPrivate *priv = NM_POLKIT_LISTENER_GET_PRIVATE (object); if (priv->reg_handle) polkit_agent_listener_unregister (priv->reg_handle); g_free (priv->action_id); g_free (priv->message); g_free (priv->icon_name); g_free (priv->identity); G_OBJECT_CLASS (nm_polkit_listener_parent_class)->finalize (object); }
void cockpit_polkit_agent_unregister (gpointer handle) { if (handle) polkit_agent_listener_unregister (handle); }