Compare commits

...

1 Commits

Author SHA1 Message Date
Barnabás Pőcze
c4d883ebdb object-cache: Avoid use after free of task error
The error should not be touched after passing it to
`g_task_return_error()` as noted by its documentation:

  Note that since the task takes ownership of @error, and since the
  task may be completed before returning from g_task_return_error(),
  you cannot assume that @error is still valid after calling this.

However, previously, the code did try to free error since the
`local_error` was defined with `g_autoptr(GError)`.


(cherry picked from commit f00fd653cb)
2022-10-19 19:27:56 +00:00

View File

@@ -91,7 +91,7 @@ create_dbus_proxy_in_thread_cb (GTask *task,
if (local_error)
{
g_task_return_error (task, local_error);
g_task_return_error (task, g_steal_pointer (&local_error));
return;
}