Skip to content

Commit

Permalink
svcauth_gss: fix error return code in rsc_parse()
Browse files Browse the repository at this point in the history
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Wei Yongjun authored and J. Bruce Fields committed Apr 30, 2013
1 parent 2a6cf94 commit 1eb6d62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/sunrpc/auth_gss/svcauth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ static int rsc_parse(struct cache_detail *cd,
len = qword_get(&mesg, buf, mlen);
if (len > 0) {
rsci.cred.cr_principal = kstrdup(buf, GFP_KERNEL);
if (!rsci.cred.cr_principal)
if (!rsci.cred.cr_principal) {
status = -ENOMEM;
goto out;
}
}

}
Expand Down

0 comments on commit 1eb6d62

Please sign in to comment.