diff mbox series

[BlueZ,03/10] mesh: Remove agent when freeing node's dynamic resources

Message ID 20200522003501.106165-4-inga.stotland@intel.com (mailing list archive)
State Accepted
Headers show
Series Mesh code clean up | expand

Commit Message

Stotland, Inga May 22, 2020, 12:34 a.m. UTC
This adds clean up of node's agent instance when node's dynamic
resources are freed.
---
 mesh/node.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/mesh/node.c b/mesh/node.c
index d5e07ce7f..8ad77639e 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -333,6 +333,7 @@  static void free_node_resources(void *data)
 	/* Free dynamic resources */
 	free_node_dbus_resources(node);
 	l_queue_destroy(node->elements, element_free);
+	mesh_agent_remove(node->agent);
 	mesh_config_release(node->cfg);
 	mesh_net_free(node->net);
 	l_free(node->storage_dir);