if (g_strcmp0(old_ip, ip_addr) != 0 || old_ip == NULL) {
if (ip_addr != NULL)
netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, ip_addr);
- else if (strlen(old_ip) > 0)
+ else if (old_ip != NULL && strlen(old_ip) > 0)
netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, "");
}
g_free(old_ip);
if (g_strcmp0(old_ip6, ip_addr6) != 0 || old_ip6 == NULL) {
if (ip_addr6 != NULL)
netconfig_set_vconf_str(VCONFKEY_NETWORK_IP6, ip_addr6);
- else if (strlen(old_ip6) > 0)
+ else if (old_ip6 != NULL && strlen(old_ip6) > 0)
netconfig_set_vconf_str(VCONFKEY_NETWORK_IP6, "");
}
g_free(old_ip6);