fixing error handling in sspi context establishment
This commit is contained in:
parent
e0fc4cf985
commit
83ab0b3f86
1 changed files with 5 additions and 4 deletions
|
|
@ -169,7 +169,7 @@ authsspi_create_default(CLIENT *clnt, char *service, int svc)
|
|||
|
||||
auth = authsspi_create(clnt, name, sec);
|
||||
if (auth == NULL)
|
||||
goto out_free_cred;
|
||||
goto out_free_sec;
|
||||
|
||||
out:
|
||||
if (name != SSPI_C_NO_NAME) {
|
||||
|
|
@ -181,10 +181,11 @@ out:
|
|||
}
|
||||
|
||||
return (auth);
|
||||
out_free_cred:
|
||||
FreeCredentialsHandle(&sec->cred);
|
||||
out_free_sec:
|
||||
free(sec);
|
||||
if (rpc_createerr.cf_error.re_errno == ENOMEM) {
|
||||
FreeCredentialsHandle(&sec->cred);
|
||||
free(sec);
|
||||
}
|
||||
out_err:
|
||||
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
||||
rpc_createerr.cf_error.re_errno = ENOMEM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue