Fixed memory leak 52/113652/1 accepted/tizen/common/20170210.170537 accepted/tizen/ivi/20170214.011043 accepted/tizen/mobile/20170214.010836 accepted/tizen/tv/20170214.010926 accepted/tizen/unified/20170309.031131 accepted/tizen/wearable/20170214.011011 submit/tizen/20170210.072732 submit/tizen/20170210.083740 submit/tizen_unified/20170308.100403
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 8 Feb 2017 08:42:07 +0000 (17:42 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 8 Feb 2017 08:42:40 +0000 (17:42 +0900)
WGID-12828, WGID-13363, WGID-13674,
WGID-168659, WGID-169546

Change-Id: I113e49a6240e68e38de513c895e01eaf692c31cd
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
sources/libraries/Common/common_eap_connect.c
sources/libraries/Common/common_pswd_popup.c
sources/ui-gadget/viewers-layout/wifi_viewer_list.c

index 2e98071..bfb948b 100755 (executable)
@@ -1988,6 +1988,7 @@ eap_connect_data_t *create_eap_view(Evas_Object *layout_main, Evas_Object *win,
                if (ssid == NULL) {
                        if(eap_data->ssid)
                                g_free(eap_data->ssid);
+                       g_free(eap_data);
                        return NULL;
                }
 
index 840f0d4..6046dc2 100755 (executable)
@@ -248,6 +248,7 @@ void create_pbc_popup(pswd_popup_t *pswd_popup_data, Evas_Smart_Cb cancel_cb,
 
        layout = elm_layout_add(popup);
        if (layout == NULL) {
+               g_free(pbc_popup_data);
                return;
        }
 
@@ -687,6 +688,7 @@ pswd_popup_t *create_passwd_popup(Evas_Object *conformant,Evas_Object *win_main,
 
        if (!passpopup) {
                ERROR_LOG(UG_NAME_ERR, "Could not initialize popup");
+               g_free(pswd_popup_data);
                return NULL;
        }
 
index 24da120..b6c7dda 100755 (executable)
@@ -1104,7 +1104,12 @@ Elm_Object_Item *viewer_list_item_insert_after(wifi_device_info_t *wifi_device,
 #endif
 
        gdata = g_try_new0(ug_genlist_data_t, 1);
-       retvm_if(NULL == gdata, NULL);
+       if (gdata == NULL) {
+               if (no_wifi_device)
+                       g_free(no_wifi_device->ssid);
+               return NULL;
+       }
+
        gdata->device_info = wifi_device;
        gdata->radio_mode = VIEWER_ITEM_RADIO_MODE_OFF;