From: Mark Andrews Date: Fri, 26 Oct 2018 06:46:15 +0000 (+1100) Subject: free hkey on error X-Git-Tag: v9.13.4~85^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3219a873a977e50536eb5f0a9533a2d695f26ab4;p=thirdparty%2Fbind9.git free hkey on error --- diff --git a/lib/dns/hmac_link.c b/lib/dns/hmac_link.c index 464628db13e..71d1b6a2b5a 100644 --- a/lib/dns/hmac_link.c +++ b/lib/dns/hmac_link.c @@ -360,6 +360,7 @@ hmac_fromdns(isc_md_type_t type, dst_key_t *key, isc_buffer_t *data) { if (r.length > (unsigned int)isc_md_type_get_block_size(type)) { if (isc_md(type, r.base, r.length, hkey->key, &keylen) != ISC_R_SUCCESS) { + isc_mem_put(key->mctx, hkey, sizeof(dst_hmac_key_t)); return (DST_R_OPENSSLFAILURE); } } else {