Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2026 10:23:25 +0000
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9f1be4bfebd0 - main - cap_dns: plug a memory leak
Message-ID:  <69d8cf9d.1ce2e.4fb747aa@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by oshogbo:

URL: https://cgit.FreeBSD.org/src/commit/?id=9f1be4bfebd08b249877267a1634c249c9f6d221

commit 9f1be4bfebd08b249877267a1634c249c9f6d221
Author:     Mariusz Zaborski <oshogbo@FreeBSD.org>
AuthorDate: 2026-04-10 10:19:05 +0000
Commit:     Mariusz Zaborski <oshogbo@FreeBSD.org>
CommitDate: 2026-04-10 10:20:27 +0000

    cap_dns: plug a memory leak
---
 lib/libcasper/services/cap_dns/cap_dns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c
index 8681f0baef40..8e660b197e3a 100644
--- a/lib/libcasper/services/cap_dns/cap_dns.c
+++ b/lib/libcasper/services/cap_dns/cap_dns.c
@@ -267,7 +267,7 @@ cap_getaddrinfo(cap_channel_t *chan, const char *hostname, const char *servname,
 	}
 	nvlist_destroy(nvl);
 	if (curai == NULL && nvlai != NULL) {
-		if (firstai == NULL)
+		if (firstai != NULL)
 			freeaddrinfo(firstai);
 		return (EAI_MEMORY);
 	}


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d8cf9d.1ce2e.4fb747aa>