Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
for (struct cg_proc_stat *prev = NULL; node; ) {
if (!cgroup_supports("cpu", node->cg, "cpu.shares")) {
- call_cleaner(free_proc_stat_node) struct cg_proc_stat *cur = node;
+ struct cg_proc_stat *cur = node;
if (prev)
prev->next = node->next;
first = node->next;
node = node->next;
- lxcfs_debug("Removing stat node for %s\n", cur->cg);
+ lxcfs_debug("Removing stat node for %s\n", cur);
+
+ free_proc_stat_node(cur);
} else {
if (!first)
first = node;