In both cfg_kasp_fromconfig() and cfg_kasp_builtinconfig(), the
newly allocated KASP key was not destroyed when the keystore
lookup failed.
(cherry picked from commit
df1993611bae62ad0267d8652d599b4158f3e9a9)
"find keystore (%s)",
isc_result_totext(result));
}
+ dns_kasp_key_destroy(new_key);
goto cleanup;
}
dns_kasp_addkey(kasp, new_key);
DNS_KEYSTORE_KEYDIRECTORY,
&new_key->keystore);
if (result != ISC_R_SUCCESS) {
+ dns_kasp_key_destroy(new_key);
goto cleanup;
}
dns_kasp_addkey(kasp, new_key);