]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
test for key != NULL on error path
authorMark Andrews <marka@isc.org>
Wed, 13 Dec 2017 04:11:22 +0000 (15:11 +1100)
committerMark Andrews <marka@isc.org>
Wed, 13 Dec 2017 04:13:18 +0000 (15:13 +1100)
(cherry picked from commit 9bad78cbc2f4c8cacb4c4b82d4207fd45ea3d598)

bin/tests/dst/t_dst.c

index 8547aa44d1e8a4640458992bb6f254c4acce2af9..32595b1fdbf58d8b4afc43da642f05e94b1b0e00 100644 (file)
@@ -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