Commit e601a2ea authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

cgroup: trigger BUG if a mtype is unknown

CID 1230179 (#1 of 1): Resource leak (RESOURCE_LEAK)
15. leaked_storage: Variable "ncd" going out of scope leaks the storage
it points to.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9ba0baab
......@@ -263,6 +263,8 @@ static int add_cgroup(const char *fpath, const struct stat *sb, int typeflag)
list_add_tail(&ncd->siblings, &current_controller->heads);
current_controller->n_heads++;
break;
default:
BUG();
}
INIT_LIST_HEAD(&ncd->children);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment