]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
free hkey on error
authorMark Andrews <marka@isc.org>
Fri, 26 Oct 2018 06:46:15 +0000 (17:46 +1100)
committerMark Andrews <marka@isc.org>
Fri, 26 Oct 2018 06:46:15 +0000 (17:46 +1100)
lib/dns/hmac_link.c

index 464628db13e8ba9a29ed19634bf13e6d108682ea..71d1b6a2b5a45073240c61936d3052df6214a5c6 100644 (file)
@@ -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 {