[CID-109055, 110674, 107585] Fix coverity issue 41/174641/2 accepted/tizen/unified/20180406.062025 submit/tizen/20180404.081806
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 3 Apr 2018 09:24:56 +0000 (18:24 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 3 Apr 2018 09:28:52 +0000 (18:28 +0900)
Change-Id: I166c3e3e5364dacf642eda8a4aa5016737884697

packaging/wifi-efl-ug.spec
sources/libraries/WlanManager/WlanManager/wlan_manager.c
sources/ui-gadget/viewers-layout/wifi_viewer_list.c
sources/wifi-syspopup/viewer-popups/view-main.c

index e8fee1d..e2cbec6 100644 (file)
@@ -1,6 +1,6 @@
 Name:          wifi-efl-ug
 Summary:       Wi-Fi UI Gadget for TIZEN
-Version:       1.0.235
+Version:       1.0.236
 Release:       1
 Group:         App/Network
 License:       Flora-1.1
index c606583..8c11a07 100755 (executable)
@@ -527,13 +527,16 @@ static bool wifi_found_ap_with_state_cb(wifi_manager_ap_h ap, void* user_data)
 
 wifi_manager_ap_h wlan_manager_get_ap_with_state(int ap_state)
 {
+       int ret_val = 0;
        ap_state_info_t ap_state_info;
        wifi_manager_ap_h ap = NULL;
 
        ap_state_info.state = ap_state;
        ap_state_info.ap = &ap;
 
-       wifi_manager_foreach_found_ap(manager_object->wifi, wifi_found_ap_with_state_cb, &ap_state_info);
+       ret_val = wifi_manager_foreach_found_ap(manager_object->wifi, wifi_found_ap_with_state_cb, &ap_state_info);
+       if (ret_val != WIFI_MANAGER_ERROR_NONE)
+               return NULL;
 
        return ap;
 }
index a3fde43..2d0e6d2 100755 (executable)
@@ -1252,6 +1252,7 @@ Elm_Object_Item* item_get_for_ap(wifi_manager_ap_h ap)
                __COMMON_FUNC_EXIT__;
                return NULL;
        } else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &type)) {
+               g_free(essid);
                __COMMON_FUNC_EXIT__;
                return NULL;
        }
index db6ca15..3226fd5 100755 (executable)
@@ -737,6 +737,7 @@ void view_main_item_state_set(wifi_manager_ap_h ap, ITEM_CONNECTION_MODES state)
                (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_essid(ap, &item_ssid)) ||
                (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &sec_type))) {
                ERROR_LOG(SP_NAME_NORMAL, "Invalid params");
+               g_free(item_ssid);
                __COMMON_FUNC_EXIT__;
                return;
        }