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
parent a1d5395f10
commit bdefe5f9e1

View File

@ -1616,6 +1616,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
{