[gdm/gnome-3-18] session: keep session object alive while establishing credentials
- From: Tim Lunn <timl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-3-18] session: keep session object alive while establishing credentials
- Date: Thu, 14 Apr 2016 07:01:24 +0000 (UTC)
commit 89260fa22c21c2cee5cf2663f5758e1f23b198e6
Author: Ray Strode <rstrode redhat com>
Date: Fri Jan 22 15:59:00 2016 -0500
session: keep session object alive while establishing credentials
The only reference to session objects gets cleaned up when
verification-complete is emitted, which happens in the middle
of the establish_credentials handler.
This commit makes sure the session object stays alive until the
handler completes to prevent a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=754814
daemon/gdm-session.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index affcb35..46e3b18 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -304,8 +304,8 @@ on_establish_credentials_cb (GdmDBusWorker *proxy,
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
return;
- self = conversation->session;
- service_name = conversation->service_name;
+ self = g_object_ref (conversation->session);
+ service_name = g_strdup (conversation->service_name);
if (worked) {
if (self->priv->user_verifier_interface != NULL) {
@@ -326,6 +326,9 @@ on_establish_credentials_cb (GdmDBusWorker *proxy,
} else {
report_and_stop_conversation (self, service_name, error);
}
+
+ g_free (service_name);
+ g_object_unref (self);
}
static const char **
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]