pTicketRequest = (PKERB_RETRIEVE_TKT_REQUEST) LocalAlloc(LMEM_ZEROINIT, RequestSize);
if (!pTicketRequest) {
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
return FALSE;
}
);
LocalFree(pTicketRequest);
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
if (FAILED(Status) || FAILED(SubStatus)) {
if ( SubStatus == STATUS_NOT_SUPPORTED )
pCacheRequest = (PKERB_QUERY_TKT_CACHE_REQUEST) LocalAlloc(LMEM_ZEROINIT, RequestSize);
if (!pCacheRequest) {
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
return FALSE;
}
);
LocalFree(pCacheRequest);
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
if (!(FAILED(Status) || FAILED(SubStatus))) {
LsaFreeReturnBuffer(pCacheResponse);
lid = (krb5_ccache) malloc(sizeof(struct _krb5_ccache));
if (lid == NULL) {
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
return KRB5_CC_NOMEM;
}
lid->data = (krb5_pointer) malloc(sizeof(krb5_lcc_data));
if (lid->data == NULL) {
free(lid);
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
return KRB5_CC_NOMEM;
}
if (data->cc_name == NULL) {
free(lid->data);
free(lid);
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
return KRB5_CC_NOMEM;
}
strcpy(data->cc_name, residual);
free(data->cc_name);
free(lid->data);
free(lid);
- CloseHandle(LogonHandle);
+ LsaDeregisterLogonProcess(LogonHandle);
return KRB5_FCC_NOFILE;
}
data = (krb5_lcc_data *) id->data;
if (data) {
- CloseHandle(data->LogonHandle);
+ LsaDeregisterLogonProcess(data->LogonHandle);
free(data);
}
free(id);