mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Make sure the GTask
is freed on a graceful disconnect
This fixes the memory leak in the case the connection has been successfully closed by the peer.
This commit is contained in:
parent
f51f40c440
commit
cabc494073
@ -206,6 +206,8 @@ async_close_finish (GTask *task,
|
|||||||
g_task_return_error (task, error);
|
g_task_return_error (task, error);
|
||||||
else
|
else
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
|
|
||||||
|
g_object_unref (task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -231,7 +233,6 @@ close_read_ready (GSocket *socket,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
async_close_finish (task, error);
|
async_close_finish (task, error);
|
||||||
g_object_unref (task);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user