static HINSTANCE hSecur32 = 0;
#endif /* USE_MS2MIT */
static HINSTANCE hAdvApi32 = 0;
-static HINSTANCE hAfsTokens = 0;
-static HINSTANCE hAfsConf = 0;
static HINSTANCE hComErr = 0;
static HINSTANCE hService = 0;
static HINSTANCE hProfile = 0;
FreeLibrary(hKrb4);
if (hProfile)
FreeLibrary(hProfile);
- if (hAfsTokens)
- FreeLibrary(hAfsTokens);
- if (hAfsConf)
- FreeLibrary(hAfsConf);
if (hComErr)
FreeLibrary(hComErr);
if (hService)
hSecur32 &&
#endif /* USE_MS2MIT */
hKrb524 &&
- hProfile && hAfsTokens && hAfsConf && hLeash && hCCAPI )
+ hProfile && hLeash && hCCAPI )
return TRUE;
return FALSE;
}
krb5_creds * k5creds = 0;
krb5_error_code code;
krb5_principal client_principal = 0;
- char * cname = 0, *sname = 0;
int i, retry = 0;
CurrentState = 0;
if ( IsDebuggerPresent() ) {
+ char * cname, *sname;
pkrb5_unparse_name(ctx, increds.client, &cname);
pkrb5_unparse_name(ctx, increds.server, &sname);
OutputDebugString("Getting tickets for \"");
OutputDebugString("\" and service \"");
OutputDebugString(sname);
OutputDebugString("\"\n");
- cname = sname = 0;
+ pkrb5_free_unparsed_name(ctx,cname);
+ pkrb5_free_unparsed_name(ctx,sname);
}
code = pkrb5_get_credentials(ctx, 0, cc, &increds, &k5creds);
OutputDebugString("\"\n");
pkrb5_free_unparsed_name(ctx,cname);
pkrb5_free_unparsed_name(ctx,sname);
- cname = sname = 0;
}
if (!code)
OutputDebugString("\"\n");
pkrb5_free_unparsed_name(ctx,cname);
pkrb5_free_unparsed_name(ctx,sname);
- cname = sname = 0;
}
if (!code)
OutputDebugString("\"\n");
pkrb5_free_unparsed_name(ctx,cname);
pkrb5_free_unparsed_name(ctx,sname);
- cname = sname = 0;
}
if (!code)
}
cleanup:
- if (cname)
- pkrb5_free_unparsed_name(ctx,cname);
- if (sname)
- pkrb5_free_unparsed_name(ctx,sname);
if (client_principal)
pkrb5_free_principal(ctx,client_principal);
/* increds.client == client_principal */
lock_ReleaseWrite(&cm_serverLock);
}
+/* call cm_FreeServer while holding a write lock on cm_serverLock */
void cm_FreeServer(cm_server_t* server)
{
- lock_ObtainWrite(&cm_serverLock);
if (--(server->refCount) == 0)
{
/* we need to check to ensure that all of the connections
}
}
}
- lock_ReleaseWrite(&cm_serverLock);
-}
+ }
void cm_FreeServerList(cm_serverRef_t** list)
{