From bbe5bf669b649e4c32fbf84f024b1a49db631388 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 28 Jun 2020 11:02:32 -0400 Subject: [PATCH] krb5: krb5_free_context unconditionally call hx509_context_free Its safe to call hx509_context_free() with a NULL context. Change-Id: I47e3aa1b57a2008dbfcd8d6de1b9c6ded84414db --- lib/krb5/context.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/krb5/context.c b/lib/krb5/context.c index 9dd9d6442..de1c3fe6e 100644 --- a/lib/krb5/context.c +++ b/lib/krb5/context.c @@ -660,8 +660,7 @@ krb5_free_context(krb5_context context) krb5_set_send_to_kdc_func(context, NULL, NULL); #ifdef PKINIT - if (context->hx509ctx) - hx509_context_free(&context->hx509ctx); + hx509_context_free(&context->hx509ctx); #endif if (context->flags & KRB5_CTX_F_SOCKETS_INITIALIZED) {