Commit 1eb6d622 authored by Wei Yongjun's avatar Wei Yongjun Committed by J. Bruce Fields

svcauth_gss: fix error return code in rsc_parse()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 2a6cf944
...@@ -506,8 +506,10 @@ static int rsc_parse(struct cache_detail *cd, ...@@ -506,8 +506,10 @@ static int rsc_parse(struct cache_detail *cd,
len = qword_get(&mesg, buf, mlen); len = qword_get(&mesg, buf, mlen);
if (len > 0) { if (len > 0) {
rsci.cred.cr_principal = kstrdup(buf, GFP_KERNEL); rsci.cred.cr_principal = kstrdup(buf, GFP_KERNEL);
if (!rsci.cred.cr_principal) if (!rsci.cred.cr_principal) {
status = -ENOMEM;
goto out; goto out;
}
} }
} }
......
Markdown is supported
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