ip_info_delete_prev(_detail_data->ip_info->prev_ip_info);
_detail_data->ip_info->prev_ip_info = NULL;
+ wifi_ap_destroy(_detail_data->ap);
+ _detail_data->ap = NULL;
+
g_free(_detail_data->ap_image_path);
_detail_data->ap_image_path = NULL;
__COMMON_FUNC_ENTER__;
bool favorite = 0;
guint id;
- wifi_ap_h ap;
static Elm_Genlist_Item_Class grouptitle_itc;
Evas_Object *layout = NULL;
Evas_Object *navi_frame = NULL;
_detail_data->win = win_main;
_detail_data->nav = navi_frame;
- _detail_data->ap = ap = device_info->ap;
- wifi_ap_is_favorite(ap, &favorite);
+
+ if (wifi_ap_clone(&_detail_data->ap, device_info->ap) != WIFI_ERROR_NONE) {
+ ERROR_LOG(UG_NAME_NORMAL, "Failed to get cloned ap");
+ g_free(_detail_data);
+ __COMMON_FUNC_EXIT__;
+ return;
+ }
+
+ wifi_ap_is_favorite(_detail_data->ap, &favorite);
if (device_info->ap_image_path) {
_detail_data->ap_image_path = g_strdup(device_info->ap_image_path);
}
wifi_security_type_e type = WIFI_SECURITY_TYPE_NONE;
- wifi_ap_get_security_type(ap, &type);
+ wifi_ap_get_security_type(_detail_data->ap, &type);
if (WIFI_SECURITY_TYPE_EAP == type) {
wifi_connection_state_e connection_state;
- wifi_ap_get_connection_state(ap, &connection_state);
+ wifi_ap_get_connection_state(_detail_data->ap, &connection_state);
if (favorite || WIFI_CONNECTION_STATE_CONNECTED == connection_state) {
- _detail_data->eap_info_list = eap_info_append_items(ap,
+ _detail_data->eap_info_list = eap_info_append_items(_detail_data->ap,
detailview_list, PACKAGE, __view_detail_imf_ctxt_evnt_cb,
navi_it);
}
/* Append the ip info details */
id = common_util_managed_idle_add(__view_detail_load_ip_info_list_cb, _detail_data);
if (!id) {
+ wifi_ap_destroy(_detail_data->ap);
+ g_free(_detail_data->ap_image_path);
g_free(_detail_data);
}