diff options
author | Allison Karlitskaya <allison.karlitskaya@redhat.com> | 2019-05-09 12:21:52 +0200 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-05-09 17:54:37 +0100 |
commit | daac518778e5e6acf3df411723e7dd3a5e0bbadd (patch) | |
tree | ddde29cbf5cec0089dfb8d0854bca7239cf82db7 | |
parent | 3f40ca54b0aeda49d7ce96a4c9b723ff95e0a85a (diff) | |
download | glib-daac518778e5e6acf3df411723e7dd3a5e0bbadd.tar.gz |
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
-rw-r--r-- | gio/gsocketclient.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c index 97427cbf1..81767c0d6 100644 --- a/gio/gsocketclient.c +++ b/gio/gsocketclient.c @@ -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 { |