sIssue reported off dev list by Gabriel Schulhof.
Change-Id: Ifa529da59fb784fd5cdef6ca333635cf99ed1f59
Signed-off-by: John Light <john.j.light@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2160
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
struct ifaddrs *ifa = NULL;
for (ifa = ifp; ifa; ifa = ifa->ifa_next)
{
+ if (!ifa->ifa_addr)
+ {
+ continue;
+ }
int family = ifa->ifa_addr->sa_family;
if ((ifa->ifa_flags & IFF_LOOPBACK) || (AF_INET != family && AF_INET6 != family))
{