upstream: Plug mem leak on error path. Coverity CID 405026, ok djm@.
OpenBSD-Commit-ID: 8212ca05d01966fb5e72205c592b2257708a2aac
This commit is contained in:
parent
bf4dae0ad1
commit
89b8df518f
3
dns.c
3
dns.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: dns.c,v 1.43 2023/02/10 04:56:30 djm Exp $ */
|
/* $OpenBSD: dns.c,v 1.44 2023/03/10 04:06:21 dtucker Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
|
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
|
||||||
|
@ -258,6 +258,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
|
||||||
if (!dns_read_key(&hostkey_algorithm, &dnskey_digest_type,
|
if (!dns_read_key(&hostkey_algorithm, &dnskey_digest_type,
|
||||||
&hostkey_digest, &hostkey_digest_len, hostkey)) {
|
&hostkey_digest, &hostkey_digest_len, hostkey)) {
|
||||||
error("Error calculating key fingerprint.");
|
error("Error calculating key fingerprint.");
|
||||||
|
free(dnskey_digest);
|
||||||
freerrset(fingerprints);
|
freerrset(fingerprints);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue