Skip to content

Commit

Permalink
Merge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
Linus Torvalds committed Aug 6, 2013
2 parents 4264bc1 + da0a12c commit 8e28921
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8e28921

Please sign in to comment.