cap_dns: plug a memory leak

This commit is contained in:
Mariusz Zaborski
2026-04-10 12:19:05 +02:00
parent 4da93b9a8a
commit 9f1be4bfeb
+1 -1
View File
@@ -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);
}