gsocketclient: Unit test for "Fix a leak of the task data on an error path"
Add a unit test to complement the merge request !3719 (closed). This merge request fixes a leak and it has been verified to work by the reporter of the associated issue (#3184 (closed)). I have also verified that it solves problems seen in our environment. The reason for not yet having this merged is that a unit test was required. Here I hope to contribute with such a test.
=== Comment for the actual fix by Philip Withnall ===
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 (closed)