userns: don't leak root user

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Cedric Le Goater <clg@fr.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alexey Dobriyan 2007-08-30 23:56:34 -07:00 committed by Linus Torvalds
parent 59845b1ffd
commit 99db67bc04
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
struct user_namespace *ns; struct user_namespace *ns;
ns = container_of(kref, struct user_namespace, kref); ns = container_of(kref, struct user_namespace, kref);
free_uid(ns->root_user);
kfree(ns); kfree(ns);
} }