connman_inet_ifname can return a NULL pointer. For example this
happens when all wifi interfaces are being removed because the wifi
dongle has been unplugged. The service is still valid at this point
but there is no device anymore. The kernel will then correctly return
NULL.
idx = __connman_service_get_index(info->service);
info->ifname = connman_inet_ifname(idx);
-
+ if (info->ifname == NULL)
+ info->ifname = "";
} else {
info->bearer = "";
info->online = FALSE;