From 7eb80ec72939d6ef0e04a24714560834066d3524 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Wed, 8 Feb 2017 17:42:07 +0900 Subject: [PATCH] Fixed memory leak WGID-12828, WGID-13363, WGID-13674, WGID-168659, WGID-169546 Change-Id: I113e49a6240e68e38de513c895e01eaf692c31cd Signed-off-by: Seonah Moon --- sources/libraries/Common/common_eap_connect.c | 1 + sources/libraries/Common/common_pswd_popup.c | 2 ++ sources/ui-gadget/viewers-layout/wifi_viewer_list.c | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sources/libraries/Common/common_eap_connect.c b/sources/libraries/Common/common_eap_connect.c index 2e98071..bfb948b 100755 --- a/sources/libraries/Common/common_eap_connect.c +++ b/sources/libraries/Common/common_eap_connect.c @@ -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; } diff --git a/sources/libraries/Common/common_pswd_popup.c b/sources/libraries/Common/common_pswd_popup.c index 840f0d4..6046dc2 100755 --- a/sources/libraries/Common/common_pswd_popup.c +++ b/sources/libraries/Common/common_pswd_popup.c @@ -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; } diff --git a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c index 24da120..b6c7dda 100755 --- a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c +++ b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c @@ -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; -- 2.7.4