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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
		
					parent
					
						
							
								2a6cf944c2
							
						
					
				
			
			
				commit
				
					
						1eb6d6223a
					
				
			
		
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -506,9 +506,11 @@ 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;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	rsci.h.expiry_time = expiry;
 | 
						rsci.h.expiry_time = expiry;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue