dbus: Free instance only after all references removed
PATCH 1/1 dbus: Free instance only after all references removed
In _dbus_object_tree_remove_interface move the freeing of the instance object to after we've dropped any queued Property Change and Interface Added/Removed records referring to that instance. We didn't really need the object around for that (only the pointer) but we want to be extra careful.
--- ell/dbus-service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ell/dbus-service.c +2 -2
@@ -1529,8 +1529,6 @@ bool _dbus_object_tree_remove_interface(struct _dbus_object_tree *tree,if (!instance)return false; -interface_instance_free (instance); -if (!strcmp (interface,L_DBUS_INTERFACE_OBJECT_MANAGER )) { manager = l_queue_remove_if(tree->object_managers, match_object_manager_path,
@@ -1591,6 +1589,8 @@ bool _dbus_object_tree_remove_interface(struct _dbus_object_tree *tree,if (property_change_rec)property_change_record_free (property_change_rec); +interface_instance_free (instance); +return true; }
Signature · 1 line
2.11.0
Denis Kenzior
AppliedHi Andrew,
Quoted 9 lines · Andrew Zaborowski
In
_dbus_object_tree_remove_interfacemove the freeing of the instance object to after we've dropped any queued Property Change and Interface Added/Removed records referring to that instance. We didn't really need the object around for that (only the pointer) but we want to be extra careful.--- ell/dbus-service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Regards,
-Denis