Skip to content

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

The ref held by data->task may be the last one on the GTask. The GTask stores attempt->data as its task data, and so when the GTask is finalised, attempt->data is too. connection_attempt_remove() needs to access attempt->data, so must be called before the g_object_unref() in this situation.

Signed-off-by: Philip Withnall pwithnall@gnome.org

Fixes: #3266 (closed)

Closes #3266 (closed)

Merge request reports