Commit 68910f30 authored by Marco Trevisan's avatar Marco Trevisan 🎺 Committed by Iain Lane

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
(cherry picked from commit 4654042d)
parent d6199fac
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment