[openssh-commits] [openssh] 01/01: upstream: Plug mem leak on error path. Coverity CID 405026, ok djm at .

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Mar 10 15:42:48 AEDT 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 89b8df518f21677045599df0ad3e5dd0f39909b5
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Mar 10 04:06:21 2023 +0000

    upstream: Plug mem leak on error path. Coverity CID 405026, ok djm at .
    
    OpenBSD-Commit-ID: 8212ca05d01966fb5e72205c592b2257708a2aac
---
 dns.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dns.c b/dns.c
index 823951ef..93924144 100644
--- a/dns.c
+++ b/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.
@@ -258,6 +258,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
 		if (!dns_read_key(&hostkey_algorithm, &dnskey_digest_type,
 		    &hostkey_digest, &hostkey_digest_len, hostkey)) {
 			error("Error calculating key fingerprint.");
+			free(dnskey_digest);
 			freerrset(fingerprints);
 			return -1;
 		}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list