mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 10:12:24 +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;
|
ip_info = (struct ip_req *)msg;
|
||||||
if (ip_info->ifa.ifa_index == ifindex) {
|
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 */
|
/* Found a result, stop searching */
|
||||||
if (*res)
|
if (*res)
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user