diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-07-25 09:22:52 +1000 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-07-25 09:22:52 +1000 |
commit | 16948c3d44f86d1f8bdfbbe46eaab758ef6233c0 (patch) | |
tree | 8d51ed7284bf0ce55d80d082912aaf3f4ca46f1f /src/greeter.c | |
parent | 592283e63628392c679d5d3036df583bf5ce50ff (diff) | |
download | lightdm-16948c3d44f86d1f8bdfbbe46eaab758ef6233c0.tar.gz |
Fix unreffing issue
Diffstat (limited to 'src/greeter.c')
-rw-r--r-- | src/greeter.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/greeter.c b/src/greeter.c index a185efd7..9c438ee0 100644 --- a/src/greeter.c +++ b/src/greeter.c @@ -371,11 +371,14 @@ handle_start_session (Greeter *greeter, const gchar *session) { gboolean result; - g_debug ("Start session session=%s", session); - if (strcmp (session, "") == 0) session = NULL; + if (session) + g_debug ("Start session %s", session); + else + g_debug ("Start default session"); + if (greeter->priv->guest_account_authenticated || pam_session_get_in_session (greeter->priv->pam_session)) g_signal_emit (greeter, signals[START_SESSION], 0, session, &result); else @@ -625,8 +628,14 @@ greeter_finalize (GObject *object) self = GREETER (object); g_object_unref (self->priv->session); - g_hash_table_unref (self->priv->hints); g_free (self->priv->read_buffer); + g_hash_table_unref (self->priv->hints); + if (self->priv->pam_session) + { + g_signal_handlers_disconnect_matched (self->priv->pam_session, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self); + pam_session_stop (self->priv->pam_session); + g_object_unref (self->priv->pam_session); + } if (self->priv->to_greeter_channel) g_io_channel_unref (self->priv->to_greeter_channel); if (self->priv->from_greeter_channel) |