Only free hx509ctx if its actually allocated

This commit is contained in:
Love Hornquist Astrand
2010-01-12 17:47:54 -08:00
parent 1b3a8d3032
commit 1f4bb75eef

View File

@@ -535,7 +535,8 @@ krb5_free_context(krb5_context context)
krb5_set_send_to_kdc_func(context, NULL, NULL);
#ifdef PKINIT
hx509_context_free(&context->hx509ctx);
if (context->hx509ctx)
hx509_context_free(&context->hx509ctx);
#endif
HEIMDAL_MUTEX_destroy(context->mutex);