From 1f4bb75eef93a5bd941528a23cd86945ecd3bbc8 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Tue, 12 Jan 2010 17:47:54 -0800 Subject: [PATCH] Only free hx509ctx if its actually allocated --- lib/krb5/context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/krb5/context.c b/lib/krb5/context.c index dff7a700c..f530350f2 100644 --- a/lib/krb5/context.c +++ b/lib/krb5/context.c @@ -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);