git: 9f1be4bfebd0 - main - cap_dns: plug a memory leak
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 Apr 2026 10:23:25 UTC
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);
}