2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 00:55:24 +00:00

Only set key->engine if engine != NULL

This commit is contained in:
Mark Andrews
2023-08-09 15:20:36 +10:00
parent d527ae11c9
commit 00a09e0d35
2 changed files with 2 additions and 2 deletions

View File

@@ -527,7 +527,7 @@ openssleddsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
goto err; goto err;
} }
if (key->engine != NULL) { if (engine != NULL) {
key->engine = isc_mem_strdup(key->mctx, engine); key->engine = isc_mem_strdup(key->mctx, engine);
} }
key->label = isc_mem_strdup(key->mctx, label); key->label = isc_mem_strdup(key->mctx, label);

View File

@@ -1051,7 +1051,7 @@ opensslrsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
DST_RET(ISC_R_RANGE); DST_RET(ISC_R_RANGE);
} }
if (key->engine != NULL) { if (engine != NULL) {
key->engine = isc_mem_strdup(key->mctx, engine); key->engine = isc_mem_strdup(key->mctx, engine);
} }
key->label = isc_mem_strdup(key->mctx, label); key->label = isc_mem_strdup(key->mctx, label);