mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gsocketclient: Fix a leak of the task data on an error path
Once the task is completed (and `g_task_return_*()` has been called), the task is no longer needed. It would make more sense to unref it in `complete_connection_with_error()`, where `g_task_return_*()` is called, but that complicates other call sites significantly, so I didn’t do it. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3184
This commit is contained in:
parent
0043895879
commit
1942dd5b5c
@ -1919,6 +1919,7 @@ try_next_connection_or_finish (GSocketClientAsyncConnectData *data,
|
||||
}
|
||||
|
||||
complete_connection_with_error (data, g_steal_pointer (&data->error_info->best_error));
|
||||
g_object_unref (data->task);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user