2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Remove blocks checking whether isc_mem_get() failed using the coccinelle

This commit is contained in:
Ondřej Surý
2019-07-16 15:52:14 +02:00
parent f63e696967
commit ae83801e2b
133 changed files with 151 additions and 1717 deletions

View File

@@ -625,8 +625,6 @@ openssleddsa_tofile(const dst_key_t *key, const char *directory) {
if (key->key_alg == DST_ALG_ED25519) {
len = DNS_KEY_ED25519SIZE;
buf = isc_mem_get(key->mctx, len);
if (buf == NULL)
return (ISC_R_NOMEMORY);
priv.elements[0].tag = TAG_EDDSA_PRIVATEKEY;
priv.elements[0].length = len;
ret = priv_ed25519_from_ossl(pkey, buf);
@@ -638,8 +636,6 @@ openssleddsa_tofile(const dst_key_t *key, const char *directory) {
} else {
len = DNS_KEY_ED448SIZE;
buf = isc_mem_get(key->mctx, len);
if (buf == NULL)
return (ISC_R_NOMEMORY);
priv.elements[0].tag = TAG_EDDSA_PRIVATEKEY;
priv.elements[0].length = len;
ret = priv_ed448_from_ossl(pkey, buf);