mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
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:
parent
a1d5395f10
commit
bdefe5f9e1
@ -1616,6 +1616,7 @@ g_socket_client_connected_callback (GObject *source,
|
|||||||
set_last_error (data, error);
|
set_last_error (data, error);
|
||||||
connection_attempt_remove (attempt);
|
connection_attempt_remove (attempt);
|
||||||
enumerator_next_async (data, FALSE);
|
enumerator_next_async (data, FALSE);
|
||||||
|
connection_attempt_unref (attempt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user