NULL should be assigned to pointer from point for free wrapper call. 63/93963/3 accepted/tizen/common/20161102.121521 accepted/tizen/ivi/20161102.072338 accepted/tizen/mobile/20161102.072239 accepted/tizen/tv/20161102.072255 accepted/tizen/wearable/20161102.072312 submit/tizen/20161101.065543
authorNishant Chaprana <n.chaprana@samsung.com>
Wed, 26 Oct 2016 10:16:11 +0000 (15:46 +0530)
committercheoleun moon <chleun.moon@samsung.com>
Tue, 1 Nov 2016 05:47:17 +0000 (22:47 -0700)
Description: ip_info_remove() and ip_info_delete_prev() use pass by value
to share data, due to which assignment of NULL to local pointer variable is useless.

Change-Id: I393891860fb94f44d0198cc68e876406d35ea582
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/wifi-efl-ug.spec
sources/libraries/Common/common_ip_info.c
sources/ui-gadget/viewers-layout/view_detail.c

index 46c5476..586b9ac 100644 (file)
@@ -1,7 +1,7 @@
 %define _unpackaged_files_terminate_build 0
 Name:          wifi-efl-ug
 Summary:       Wi-Fi UI Gadget for TIZEN
-Version:       1.0.211
+Version:       1.0.212
 Release:       1
 Group:         App/Network
 License:       Flora-1.1
index 3488a26..bee7b7d 100755 (executable)
@@ -1177,7 +1177,6 @@ void ip_info_delete_prev(prev_ip_info_t *prev_ip_info)
        g_free(prev_ip_info->dns_2);
        g_free(prev_ip_info->proxy_data);
        g_free(prev_ip_info);
-       prev_ip_info = NULL;
 
        __COMMON_FUNC_EXIT__;
 }
@@ -1556,10 +1555,8 @@ void ip_info_remove(ip_info_list_t *ip_info_list)
 {
        __COMMON_FUNC_ENTER__;
 
-       if (ip_info_list) {
+       if (ip_info_list)
                g_free(ip_info_list);
-               ip_info_list = NULL;
-       }
 
        __COMMON_FUNC_EXIT__;
 }
index 6ce1f36..a37da01 100755 (executable)
@@ -325,18 +325,19 @@ static void _remove_all(view_detail_data *_detail_data)
 
                if (_detail_data->eap_info_list) {
                        eap_info_remove(_detail_data->eap_info_list);
+                       _detail_data->eap_info_list = NULL;
                }
 
                ip_info_remove(_detail_data->ip_info->ip_info_list);
-               ip_info_delete_prev(_detail_data->ip_info->prev_ip_info);
                _detail_data->ip_info->ip_info_list = NULL;
-               _detail_data->eap_info_list = NULL;
+
+               ip_info_delete_prev(_detail_data->ip_info->prev_ip_info);
+               _detail_data->ip_info->prev_ip_info = NULL;
 
                g_free(_detail_data->ap_image_path);
                _detail_data->ap_image_path = NULL;
-               g_free(_detail_data);
 
-               _detail_data = NULL;
+               g_free(_detail_data);
        }
 
        __COMMON_FUNC_EXIT__;