Message ID | CAPgLHd92VAMpeRhdmWSy_SdPwJqeVPDike6pCyV9b_WEPmK0gg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Applying, thanks.--b. On Thu, Apr 18, 2013 at 10:49:09AM +0800, Wei Yongjun wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > 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> > --- > net/sunrpc/auth_gss/svcauth_gss.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c > index 5ead605..c2156fb 100644 > --- a/net/sunrpc/auth_gss/svcauth_gss.c > +++ b/net/sunrpc/auth_gss/svcauth_gss.c > @@ -505,8 +505,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; > + } > } > > } > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 5ead605..c2156fb 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -505,8 +505,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; + } } }