aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 36066d8a4911..947fe3b22182 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -954,8 +954,11 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
954 } 954 }
955 955
956 root = kzalloc(sizeof(*root), GFP_KERNEL); 956 root = kzalloc(sizeof(*root), GFP_KERNEL);
957 if (!root) 957 if (!root) {
958 if (opts.release_agent)
959 kfree(opts.release_agent);
958 return -ENOMEM; 960 return -ENOMEM;
961 }
959 962
960 init_cgroup_root(root); 963 init_cgroup_root(root);
961 root->subsys_bits = opts.subsys_bits; 964 root->subsys_bits = opts.subsys_bits;