@@ -2309,7 +2309,7 @@ bool mesh_config_load_nodes(const char *cfgdir_name, mesh_config_node_func_t cb,
return true;
}
-void mesh_config_destroy(struct mesh_config *cfg)
+void mesh_config_release_nvm(struct mesh_config *cfg)
{
char *node_dir, *node_name;
char uuid[33];
@@ -114,7 +114,7 @@ typedef bool (*mesh_config_node_func_t)(struct mesh_config_node *node,
bool mesh_config_load_nodes(const char *cfgdir_name, mesh_config_node_func_t cb,
void *user_data);
void mesh_config_release(struct mesh_config *cfg);
-void mesh_config_destroy(struct mesh_config *cfg);
+void mesh_config_release_nvm(struct mesh_config *cfg);
bool mesh_config_save(struct mesh_config *cfg, bool no_wait,
mesh_config_status_func_t cb, void *user_data);
struct mesh_config *mesh_config_create(const char *cfgdir_name,
@@ -352,8 +352,7 @@ void node_remove(struct mesh_node *node)
l_queue_remove(nodes, node);
- if (node->cfg)
- mesh_config_destroy(node->cfg);
+ mesh_config_release_nvm(node->cfg);
free_node_resources(node);
}