From 938531cee20bad92f2dae2994513c599f6663783 Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Wed, 26 Oct 2016 15:46:11 +0530 Subject: [PATCH] NULL should be assigned to pointer from point for free wrapper call. 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 --- packaging/wifi-efl-ug.spec | 2 +- sources/libraries/Common/common_ip_info.c | 5 +---- sources/ui-gadget/viewers-layout/view_detail.c | 9 +++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 46c5476..586b9ac 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -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 diff --git a/sources/libraries/Common/common_ip_info.c b/sources/libraries/Common/common_ip_info.c index 3488a26..bee7b7d 100755 --- a/sources/libraries/Common/common_ip_info.c +++ b/sources/libraries/Common/common_ip_info.c @@ -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__; } diff --git a/sources/ui-gadget/viewers-layout/view_detail.c b/sources/ui-gadget/viewers-layout/view_detail.c index 6ce1f36..a37da01 100755 --- a/sources/ui-gadget/viewers-layout/view_detail.c +++ b/sources/ui-gadget/viewers-layout/view_detail.c @@ -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__; -- 2.7.4