Skip to content

client: fix double free in client creation failure

Christian Kellner requested to merge client_gcc318 into master

In the async version of the client creation, i.e. when a new client is created via bolt_client_new_async, g_task_return_error() is used to indicate the creation failed. The ownership of the error moves over to the GTask; since the GError was declared with g_autoptr but the error not set to NULL after the call to g_task_return_error it will eventually result in a double-free. Fix this by removing the g_autoptr, which is unnecessary because the in the only case where the error is set, it will always be transferred over to g_task_return_error.

Merge request reports