From c92193d7ff2e35e49bb697b9dfedb06d01f03fe5 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 13 Dec 2017 15:11:22 +1100 Subject: [PATCH] test for key != NULL on error path (cherry picked from commit 9bad78cbc2f4c8cacb4c4b82d4207fd45ea3d598) --- bin/tests/dst/t_dst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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