summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-08-28 10:08:56 -0400
committerRay Strode <rstrode@redhat.com>2018-08-28 10:29:10 -0400
commitd80a8a37935248eee6ad6f9256e1c89693c9335d (patch)
tree2ead21577c92a5b9a9b277134a11841fd97631f1 /daemon/gdm-session.c
parentefd50c0fc1c70b80a04c9b4dfeb2a518d06dbad2 (diff)
downloadgdm-d80a8a37935248eee6ad6f9256e1c89693c9335d.tar.gz
session: make sure conversation is closed before its freed
Right now if the session-worker crashes, we fail to close the worker's dbus connection. This commit addresses the problem by making sure the conversation is explicitly closed at the time it's freed. Closes https://gitlab.gnome.org/GNOME/gdm/issues/388
Diffstat (limited to 'daemon/gdm-session.c')
-rw-r--r--daemon/gdm-session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 600da0f3..04f879a7 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -185,6 +185,8 @@ static gboolean gdm_session_is_wayland_session (GdmSession *self);
static void update_session_type (GdmSession *self);
static void set_session_type (GdmSession *self,
const char *session_type);
+static void close_conversation (GdmSessionConversation *conversation);
+
static guint signals [LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (GdmSession,
@@ -1820,6 +1822,8 @@ setup_outside_server (GdmSession *self)
static void
free_conversation (GdmSessionConversation *conversation)
{
+ close_conversation (conversation);
+
if (conversation->job != NULL) {
g_warning ("Freeing conversation '%s' with active job", conversation->service_name);
}