}
if (WIFI_IP_CONFIG_TYPE_STATIC == ip_info_list_data->ip_type) {
- txt = get_ip_info_text(ENTRY_TYPE_IP_ADDR);
+ txt = g_strdup(get_ip_info_text(ENTRY_TYPE_IP_ADDR));
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->ip_addr, txt) != 0) {
ip_data->is_info_changed = TRUE;
}
free_ip_info_text(ENTRY_TYPE_IP_ADDR);
+ g_free(txt);
- txt = get_ip_info_text(ENTRY_TYPE_SUBNET_MASK);
+ txt = g_strdup(get_ip_info_text(ENTRY_TYPE_SUBNET_MASK));
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->subnet_mask, txt) != 0) {
ip_data->is_info_changed = TRUE;
}
free_ip_info_text(ENTRY_TYPE_SUBNET_MASK);
+ g_free(txt);
- txt = get_ip_info_text(ENTRY_TYPE_GATEWAY);
+ txt = g_strdup(get_ip_info_text(ENTRY_TYPE_GATEWAY));
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->gateway_addr, txt) != 0) {
ip_data->is_info_changed = TRUE;
}
free_ip_info_text(ENTRY_TYPE_GATEWAY);
+ g_free(txt);
- txt = get_ip_info_text(ENTRY_TYPE_DNS_1);
+ txt = g_strdup(get_ip_info_text(ENTRY_TYPE_DNS_1));
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->dns_1, txt) != 0) {
ip_data->is_info_changed = TRUE;
}
free_ip_info_text(ENTRY_TYPE_DNS_1);
+ g_free(txt);
- txt = get_ip_info_text(ENTRY_TYPE_DNS_2);
+ txt = g_strdup(get_ip_info_text(ENTRY_TYPE_DNS_2));
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->dns_2, txt) != 0) {
ip_data->is_info_changed = TRUE;
}
free_ip_info_text(ENTRY_TYPE_DNS_2);
+ g_free(txt);
}
- proxy_addr = get_ip_info_text(ENTRY_TYPE_PROXY_ADDR);
+ proxy_addr =g_strdup(get_ip_info_text(ENTRY_TYPE_PROXY_ADDR));
if (proxy_addr == NULL) {
DEBUG_LOG(UG_NAME_NORMAL, "Set proxy type - auto");
if (prev_ip_info->proxy_type != WIFI_PROXY_TYPE_AUTO) {
wifi_ap_set_proxy_type(ap, WIFI_PROXY_TYPE_AUTO);
}
} else {
- proxy_port = txt = get_ip_info_text(ENTRY_TYPE_PROXY_PORT);
+ proxy_port = g_strdup(get_ip_info_text(ENTRY_TYPE_PROXY_PORT));
if (proxy_port) {
txt = g_strdup_printf("%s:%s", proxy_addr, proxy_port);
} else {
free_ip_info_text(ENTRY_TYPE_PROXY_ADDR);
free_ip_info_text(ENTRY_TYPE_PROXY_PORT);
+ g_free(proxy_port);
+ proxy_port = NULL;
+ g_free(txt);
}
+ txt = NULL;
+
+ g_free(proxy_addr);
+ proxy_addr = NULL;
/* ip_info_print_values(ap); */