mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
nss: Don't leak @ipAddr
In aiforaf() (which exists only when building for BSD) the @ipAddr may be leaked. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ffdce9b1f1
commit
b1d87f9ad9
@ -643,6 +643,7 @@ aiforaf(const char *name, int af, struct addrinfo *pai, struct addrinfo **aip)
|
||||
hints.ai_family = af;
|
||||
|
||||
if (getaddrinfo(ipAddr, NULL, &hints, &res0)) {
|
||||
VIR_FREE(ipAaddr);
|
||||
addrList++;
|
||||
continue;
|
||||
}
|
||||
@ -654,6 +655,7 @@ aiforaf(const char *name, int af, struct addrinfo *pai, struct addrinfo **aip)
|
||||
while ((*aip)->ai_next)
|
||||
*aip = (*aip)->ai_next;
|
||||
|
||||
VIR_FREE(ipAaddr);
|
||||
addrList++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user