Merge branch '3266-connection-attempt-unref-order' into 'main'

gsocketclient: Fix a use-after-free in g_socket_client_connected_callback()

Closes #3266

See merge request GNOME/glib!3944
This commit is contained in:
Philip Withnall 2024-02-27 09:17:13 +00:00
commit fca9568a72

View File

@ -1931,9 +1931,9 @@ g_socket_client_connected_callback (GObject *source,
if (task_completed_or_cancelled (data) || g_cancellable_is_cancelled (attempt->cancellable))
{
g_object_unref (data->task);
connection_attempt_remove (attempt);
connection_attempt_unref (attempt);
g_object_unref (data->task);
return;
}