Skip to content
Commit be50b834 authored by Dhaval Giani's avatar Dhaval Giani Committed by Linus Torvalds
Browse files

kernel/user.c: fix a memory leak when freeing up non-init usernamespaces users



We were returning early in the sysfs directory cleanup function if the
user belonged to a non init usernamespace.  Due to this a lot of the
cleanup was not done and we were left with a leak.  Fix the leak.

Reported-by: default avatarSerge Hallyn <serue@linux.vnet.ibm.com>
Signed-off-by: default avatarDhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
Tested-by: default avatarSerge Hallyn <serue@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d58ab5cf
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