From 142fb57749ad71b9a2742d27a9b5707e92752c4d Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Tue, 15 Dec 2020 10:57:45 +0900 Subject: [PATCH] Fix memory leak Change-Id: Ic4184ae3ae6d208f69328f331fe324b5c6b816ac Signed-off-by: Seonah Moon --- src/net-popup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net-popup.c b/src/net-popup.c index 08d9b93..70cf075 100755 --- a/src/net-popup.c +++ b/src/net-popup.c @@ -1492,6 +1492,7 @@ static void __net_popup_show_vpn_popup(app_control_h request, void *data) ret = app_control_get_extra_data(request, APP_CONTROL_DATA_NAME, &iface_name); if (APP_CONTROL_ERROR_NONE != ret) { log_print(NET_POPUP, "Failed to get APP_CONTROL_DATA_NAME ret = %d", ret); + free(type); elm_exit(); return; } @@ -1509,10 +1510,13 @@ static void __net_popup_show_vpn_popup(app_control_h request, void *data) ok_cb = _vpn_btn_disconnect_cb; } else { log_print(NET_POPUP, "Invalid appcontrol value"); + free(type); elm_exit(); return; } + free(type); + log_print(NET_POPUP, "title(%s) content(%s) ok(%s)", title, content, ok_btn); win = __net_popup_create_win(); -- 2.7.4