gsocketclient: Fix a leak in the connection code

We miss releasing the async operation's reference on a state object in
one of the error cases.

The call to connection_attempt_remove() (although it calls unref
internally) is not sufficient because this is releasing the reference
that the list owns.

Closes #1774
This commit is contained in:
Allison Karlitskaya
2019-05-09 12:21:52 +02:00
committed by Philip Withnall
parent 3f40ca54b0
commit daac518778

View File

@@ -1615,6 +1615,7 @@ g_socket_client_connected_callback (GObject *source,
set_last_error (data, error);
connection_attempt_remove (attempt);
enumerator_next_async (data, FALSE);
connection_attempt_unref (attempt);
}
else
{