svcauth_gss: fix error return code in rsc_parse()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 18 Apr 2013 02:49:09 +0000 (10:49 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 30 Apr 2013 22:14:15 +0000 (18:14 -0400)
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>
net/sunrpc/auth_gss/svcauth_gss.c

index b70ac1cec8f589ad5b8494163cb5459f55e40139..b1924e53e8c7251cba9ff5bcb69dfd9a28b650dd 100644 (file)
@@ -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;
+                       }
                }
 
        }