diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-06 13:59:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-06 13:59:28 -0700 |
commit | 8e28921e5e3c1760167faad53bcdb6cfa1aa0806 (patch) | |
tree | fdbad988df85349e4368cf2181dc308b3cd7dbcb /kernel | |
parent | 4264bc13712b40be38d8fc01a37c34279a27e30d (diff) | |
parent | da0a12caffad2eeadea429f83818408e7b77379a (diff) | |
download | linux-8e28921e5e3c1760167faad53bcdb6cfa1aa0806.tar.bz2 |
Merge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fix from Tejun Heo:
"Fix for a minor memory leak bug in the cgroup init failure path"
* 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: fix a leak when percpu_ref_init() fails
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 789ec4683db3..781845a013ab 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -4335,8 +4335,10 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, } err = percpu_ref_init(&css->refcnt, css_release); - if (err) + if (err) { + ss->css_free(cgrp); goto err_free_all; + } init_cgroup_css(css, ss, cgrp); |