summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/cred.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cred.c b/kernel/cred.c
index dcfa30b337c5..5a1d9702658e 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -372,7 +372,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
ret = create_user_ns(new);
if (ret < 0)
goto error_put;
- if (set_cred_ucounts(new) < 0)
+ ret = set_cred_ucounts(new);
+ if (ret < 0)
goto error_put;
}