From: Wei Yongjun Date: Thu, 18 Apr 2013 02:49:09 +0000 (+0800) Subject: svcauth_gss: fix error return code in rsc_parse() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1eb6d6223aaac87538a0e9aa0d30980df224914c;p=openwrt%2Fstaging%2Fblogic.git 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: Wei Yongjun Signed-off-by: J. Bruce Fields --- diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index b70ac1cec8f5..b1924e53e8c7 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -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; + } } }