Don't free empty structures

This commit is contained in:
fifthdegree 2022-12-11 19:38:37 -05:00 committed by David Fort
parent 1e6c5fc782
commit 6c8e4d668d

View File

@ -129,7 +129,7 @@ static void kerberos_log_msg(krb5_context ctx, krb5_error_code code)
static void kerberos_ContextFree(KRB_CONTEXT* ctx, BOOL allocated)
{
if (ctx)
if (ctx && ctx->ctx)
{
krb5_k_free_key(ctx->ctx, ctx->session_key);
krb5_k_free_key(ctx->ctx, ctx->initiator_key);