This unregisters Node interface associated with a specific node application when this application disconnects from D-Bus. --- mesh/node.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mesh/node.c b/mesh/node.c index 157991dad..a6c9332bc 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -233,7 +233,7 @@ static void free_node_resources(void *data) if (node->path) l_dbus_object_remove_interface(dbus_get_bus(), node->path, - MESH_NODE_INTERFACE); + MESH_NODE_INTERFACE); l_free(node->path); l_free(node); @@ -1020,8 +1020,12 @@ static void app_disc_cb(struct l_dbus *bus, void *user_data) l_free(node->owner); node->owner = NULL; - l_free(node->app_path); - node->app_path = NULL; + if (node->path) { + l_dbus_object_remove_interface(dbus_get_bus(), node->path, + MESH_NODE_INTERFACE); + l_free(node->app_path); + node->app_path = NULL; + } } static bool validate_element_properties(struct mesh_node *node, -- 2.17.2