Skip to content

Commit

Permalink
Check return value of ifa_get_local_ip
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
stgraber committed Oct 2, 2013
1 parent c61eaad commit 51e7a87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lxc/network.c
Expand Up @@ -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;
Expand Down

0 comments on commit 51e7a87

Please sign in to comment.