mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
SUNRPC: Fix an error code in gss_alloc_msg()
If kstrdup_const() then this function returns zero (success) but it
should return -ENOMEM.
Fixes: ac83228a71
("SUNRPC: Use namespace of listening daemon in the client AUTH_GSS upcall")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
9c5948c248
commit
fe31ce83cb
1 changed files with 3 additions and 1 deletions
|
@ -553,8 +553,10 @@ gss_alloc_msg(struct gss_auth *gss_auth,
|
|||
gss_msg->auth = gss_auth;
|
||||
if (service_name) {
|
||||
gss_msg->service_name = kstrdup_const(service_name, GFP_NOFS);
|
||||
if (!gss_msg->service_name)
|
||||
if (!gss_msg->service_name) {
|
||||
err = -ENOMEM;
|
||||
goto err_put_pipe_version;
|
||||
}
|
||||
}
|
||||
return gss_msg;
|
||||
err_put_pipe_version:
|
||||
|
|
Loading…
Reference in a new issue