summaryrefslogtreecommitdiff
path: root/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'dns.c')
-rw-r--r--dns.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/dns.c b/dns.c
index 9152e8648..6e1abb530 100644
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.c,v 1.36 2017/09/01 05:53:56 djm Exp $ */ 1/* $OpenBSD: dns.c,v 1.37 2017/09/14 04:32:21 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -294,19 +294,17 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
294 free(dnskey_digest); 294 free(dnskey_digest);
295 } 295 }
296 296
297 if (*flags & DNS_VERIFY_FOUND) { 297 free(hostkey_digest); /* from sshkey_fingerprint_raw() */
298 freerrset(fingerprints);
299
300 if (*flags & DNS_VERIFY_FOUND)
298 if (*flags & DNS_VERIFY_MATCH) 301 if (*flags & DNS_VERIFY_MATCH)
299 debug("matching host key fingerprint found in DNS"); 302 debug("matching host key fingerprint found in DNS");
300 else if (counter == fingerprints->rri_nrdatas)
301 *flags |= DNS_VERIFY_MISSING;
302 else 303 else
303 debug("mismatching host key fingerprint found in DNS"); 304 debug("mismatching host key fingerprint found in DNS");
304 } else 305 else
305 debug("no host key fingerprint found in DNS"); 306 debug("no host key fingerprint found in DNS");
306 307
307 free(hostkey_digest); /* from sshkey_fingerprint_raw() */
308 freerrset(fingerprints);
309
310 return 0; 308 return 0;
311} 309}
312 310