From: dtucker Date: Fri, 10 Mar 2023 04:06:21 +0000 (+0000) Subject: Plug mem leak on error path. Coverity CID 405026, ok djm@. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=979a897ec5cf22eff57f01c392200d4941e19759;p=openbsd Plug mem leak on error path. Coverity CID 405026, ok djm@. --- diff --git a/usr.bin/ssh/dns.c b/usr.bin/ssh/dns.c index 89872e09e68..3b538551f03 100644 --- a/usr.bin/ssh/dns.c +++ b/usr.bin/ssh/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. @@ -256,6 +256,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; }