From: Mark Andrews Date: Fri, 17 Feb 2023 00:44:45 +0000 (+1100) Subject: In hmac_createctx free ctx on isc_hmac_init failure X-Git-Tag: v9.19.11~46^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d22257a370c69060e17a466db7698c96e23526b5;p=thirdparty%2Fbind9.git In hmac_createctx free ctx on isc_hmac_init failure --- diff --git a/lib/dns/hmac_link.c b/lib/dns/hmac_link.c index 4a753fd60d8..0a0df8a25bb 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); }