summaryrefslogtreecommitdiff
path: root/src/ucm/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ucm/utils.c')
-rw-r--r--src/ucm/utils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ucm/utils.c b/src/ucm/utils.c
index 85549e12..45307b02 100644
--- a/src/ucm/utils.c
+++ b/src/ucm/utils.c
@@ -99,13 +99,13 @@ void uc_mgr_free_value(struct list_head *base)
}
}
-void uc_mgr_free_dev_list(struct list_head *base)
+void uc_mgr_free_dev_list(struct dev_list *dev_list)
{
struct list_head *pos, *npos;
- struct dev_list *dlist;
+ struct dev_list_node *dlist;
- list_for_each_safe(pos, npos, base) {
- dlist = list_entry(pos, struct dev_list, list);
+ list_for_each_safe(pos, npos, &dev_list->list) {
+ dlist = list_entry(pos, struct dev_list_node, list);
free(dlist->name);
list_del(&dlist->list);
free(dlist);
@@ -189,6 +189,7 @@ void uc_mgr_free_device(struct list_head *base)
uc_mgr_free_sequence(&dev->enable_list);
uc_mgr_free_sequence(&dev->disable_list);
uc_mgr_free_transition(&dev->transition_list);
+ uc_mgr_free_dev_list(&dev->dev_list);
uc_mgr_free_value(&dev->value_list);
list_del(&dev->list);
free(dev);