diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2018-05-09 15:43:27 +0100 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-05-16 10:01:15 -0400 |
commit | 4654042d22c71da599d60a7e2f0570acf3d4a166 (patch) | |
tree | 4294af19f0ea46b3799b2a174d98d6cff66ad6fb /libgdm | |
parent | 85184f7fe2b95dbedac14af589305ac5c4e943ef (diff) | |
download | gdm-4654042d22c71da599d60a7e2f0570acf3d4a166.tar.gz |
libgdm: Don't unref a connection that's in use
If an async task tries to reuse an open connection,
it erroneously explicitly unrefs it. That is incorrect,
because there are weak references in use to handle
disposing the connection when its no longer in use.
This commit makes sure the local connection object
in open_connection is nullified so the connection
doesn't get autofree'd.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
Diffstat (limited to 'libgdm')
-rw-r--r-- | libgdm/gdm-client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgdm/gdm-client.c b/libgdm/gdm-client.c index bcae8ba2..c017bf86 100644 --- a/libgdm/gdm-client.c +++ b/libgdm/gdm-client.c @@ -583,6 +583,8 @@ gdm_client_open_connection_finish (GdmClient *client, if (client->priv->connection == NULL) { client->priv->connection = g_steal_pointer (&connection); + } else if (client->priv->connection == connection) { + connection = NULL; } finish_pending_opens (client, NULL); |