krb5: Fix leaked hx509_context pointer
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Sun, 6 Dec 2009 02:05:45 +0000 (04:05 +0200)
committerAndrew Tridgell <tridge@samba.org>
Tue, 8 Dec 2009 01:39:10 +0000 (12:39 +1100)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/heimdal/lib/krb5/context.c

index 79e1000fd0982a02b537419982ef71cf8abce427..12fc676010f24a11b8851711d5619debafa552d1 100644 (file)
@@ -474,6 +474,10 @@ krb5_free_context(krb5_context context)
     krb5_set_ignore_addresses(context, NULL);
     krb5_set_send_to_kdc_func(context, NULL, NULL);
 
+#ifdef PKINIT
+    hx509_context_free(&context->hx509ctx);
+#endif
+
     HEIMDAL_MUTEX_destroy(context->mutex);
     free(context->mutex);