diff --git a/bin/tests/dst/t_dst.c b/bin/tests/dst/t_dst.c index 0d1ef941fe..ebce8d9123 100644 --- a/bin/tests/dst/t_dst.c +++ b/bin/tests/dst/t_dst.c @@ -390,7 +390,8 @@ io(dns_name_t *name, isc_uint16_t id, isc_uint16_t alg, int type, cleandir(tmp); failure: - dst_key_free(&key); + if (key != NULL) + dst_key_free(&key); } static void