diff options
-rw-r--r-- | kernel/cgroup.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index fc5e4a48582f..9a6c2bfa1d9f 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -923,8 +923,7 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data) | |||
923 | if (opts.release_agent) | 923 | if (opts.release_agent) |
924 | strcpy(root->release_agent_path, opts.release_agent); | 924 | strcpy(root->release_agent_path, opts.release_agent); |
925 | out_unlock: | 925 | out_unlock: |
926 | if (opts.release_agent) | 926 | kfree(opts.release_agent); |
927 | kfree(opts.release_agent); | ||
928 | mutex_unlock(&cgroup_mutex); | 927 | mutex_unlock(&cgroup_mutex); |
929 | mutex_unlock(&cgrp->dentry->d_inode->i_mutex); | 928 | mutex_unlock(&cgrp->dentry->d_inode->i_mutex); |
930 | return ret; | 929 | return ret; |
@@ -1027,15 +1026,13 @@ static int cgroup_get_sb(struct file_system_type *fs_type, | |||
1027 | /* First find the desired set of subsystems */ | 1026 | /* First find the desired set of subsystems */ |
1028 | ret = parse_cgroupfs_options(data, &opts); | 1027 | ret = parse_cgroupfs_options(data, &opts); |
1029 | if (ret) { | 1028 | if (ret) { |
1030 | if (opts.release_agent) | 1029 | kfree(opts.release_agent); |
1031 | kfree(opts.release_agent); | ||
1032 | return ret; | 1030 | return ret; |
1033 | } | 1031 | } |
1034 | 1032 | ||
1035 | root = kzalloc(sizeof(*root), GFP_KERNEL); | 1033 | root = kzalloc(sizeof(*root), GFP_KERNEL); |
1036 | if (!root) { | 1034 | if (!root) { |
1037 | if (opts.release_agent) | 1035 | kfree(opts.release_agent); |
1038 | kfree(opts.release_agent); | ||
1039 | return -ENOMEM; | 1036 | return -ENOMEM; |
1040 | } | 1037 | } |
1041 | 1038 | ||