mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 05:26:12 +00:00
Check return value of ifa_get_local_ip
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
c61eaadcf8
commit
51e7a87468
@ -882,7 +882,11 @@ static int ip_addr_get(int family, int ifindex, void **res)
|
||||
|
||||
ip_info = (struct ip_req *)msg;
|
||||
if (ip_info->ifa.ifa_index == ifindex) {
|
||||
ifa_get_local_ip(family, ip_info, res);
|
||||
if (ifa_get_local_ip(family, ip_info, res) < 0) {
|
||||
err = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Found a result, stop searching */
|
||||
if (*res)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user