Merge branch '3879-hmac_createctx-fails-to-free-context-on-isc_hmac_init-failure-v9_18' into 'v9_18'

[9.18] Resolve "hmac_createctx fails to free context on isc_hmac_init failure"

See merge request isc-projects/bind9!7556
This commit is contained in:
Mark Andrews 2023-02-18 00:50:26 +00:00
commit 833a932928

View file

@ -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);
}