From: Mark Andrews Date: Wed, 9 Aug 2023 05:20:36 +0000 (+1000) Subject: Only set key->engine if engine != NULL X-Git-Tag: v9.19.17~58^2~1 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=00a09e0d35b2da327b178baf9864a96e469062e2;p=thirdparty%2Fbind9.git Only set key->engine if engine != NULL --- diff --git a/lib/dns/openssleddsa_link.c b/lib/dns/openssleddsa_link.c index f6d1fa3a140..7e976a77561 100644 --- a/lib/dns/openssleddsa_link.c +++ b/lib/dns/openssleddsa_link.c @@ -527,7 +527,7 @@ openssleddsa_fromlabel(dst_key_t *key, const char *engine, const char *label, goto err; } - if (key->engine != NULL) { + if (engine != NULL) { key->engine = isc_mem_strdup(key->mctx, engine); } key->label = isc_mem_strdup(key->mctx, label); diff --git a/lib/dns/opensslrsa_link.c b/lib/dns/opensslrsa_link.c index 54ab04dcf70..79cae64add5 100644 --- a/lib/dns/opensslrsa_link.c +++ b/lib/dns/opensslrsa_link.c @@ -1051,7 +1051,7 @@ opensslrsa_fromlabel(dst_key_t *key, const char *engine, const char *label, DST_RET(ISC_R_RANGE); } - if (key->engine != NULL) { + if (engine != NULL) { key->engine = isc_mem_strdup(key->mctx, engine); } key->label = isc_mem_strdup(key->mctx, label);