fixed memory if AcquireCred fails

if mount -o sec=krb5 fails because the user doesn't have kerberos credentials,
we were not freeing memory allocated for sec context.
This commit is contained in:
Olga Kornievskaia 2011-05-18 18:07:56 -04:00
parent d6967ea9ef
commit c9e507f231

View file

@ -164,7 +164,8 @@ authsspi_create_default(CLIENT *clnt, char *service, int svc)
NULL, NULL, NULL, NULL, &sec->cred, &sec->expiry);
if (maj_stat != SEC_E_OK) {
log_debug("authgss_create_default: AcquireCredentialsHandleA failed with %x", maj_stat);
goto out_free_sec;
free(sec);
goto out;
}
auth = authsspi_create(clnt, name, sec);