getifaddrs may return NULL ifa_addr
getifaddrs may return NULL ifa_addr

Such ifa_addr is then dereferenced to find out address family.
Proper check is added now.

Resolves: tt#31

chenglueng/cmping,chenglueng/cmping