object-storage: Avoid double free when propagating error
In cc_object_storage_create_dbus_proxy_sync and cc_object_storage_create_dbus_proxy_finish we need to use g_steal_pointer to make sure local_error is not double freed. Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/86
This commit is contained in:
parent
eea231dc1c
commit
6ec0bcde15
1 changed files with 2 additions and 2 deletions
|
@ -256,7 +256,7 @@ cc_object_storage_create_dbus_proxy_sync (GBusType bus_type,
|
|||
|
||||
if (local_error)
|
||||
{
|
||||
g_propagate_error (error, local_error);
|
||||
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ cc_object_storage_create_dbus_proxy_finish (GAsyncResult *result,
|
|||
/* If the proxy is not cached, do the normal caching routine */
|
||||
if (local_error)
|
||||
{
|
||||
g_propagate_error (error, local_error);
|
||||
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue