mesh: Remove agent when freeing node's dynamic resources

This adds clean up of node's agent instance when node's dynamic
resources are freed.
This commit is contained in:
Inga Stotland 2020-05-21 17:34:54 -07:00 committed by Brian Gix
parent f5fcab3276
commit 7eca3becce

View File

@ -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);