From 0d56344a8e4462a0929c94b2d61f22f93c6d8ea0 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 17 Feb 2023 11:44:45 +1100 Subject: [PATCH] In hmac_createctx free ctx on isc_hmac_init failure (cherry picked from commit d22257a370c69060e17a466db7698c96e23526b5) --- lib/dns/hmac_link.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/hmac_link.c b/lib/dns/hmac_link.c index 4a753fd60d..0a0df8a25b 100644 --- a/lib/dns/hmac_link.c +++ b/lib/dns/hmac_link.c @@ -165,6 +165,7 @@ hmac_createctx(const isc_md_type_t *type, const dst_key_t *key, result = isc_hmac_init(ctx, hkey->key, isc_md_type_get_block_size(type), type); if (result != ISC_R_SUCCESS) { + isc_hmac_free(ctx); return (DST_R_UNSUPPORTEDALG); }