diff --git a/bin/tests/dst/t_dst.c b/bin/tests/dst/t_dst.c index 8547aa44d1..32595b1fdb 100644 --- a/bin/tests/dst/t_dst.c +++ b/bin/tests/dst/t_dst.c @@ -381,7 +381,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