From: Jaehyun Kim Date: Fri, 29 Jan 2021 05:39:27 +0000 (+0900) Subject: Fix double free X-Git-Tag: submit/tizen/20210209.010000~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F252516%2F1;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Fix double free Change-Id: I05c991d891295601949fb91f380383fcfc886567 Signed-off-by: Jaehyun Kim --- diff --git a/haltests/net-config-haltests.cpp b/haltests/net-config-haltests.cpp index 6538244..6fa1c03 100755 --- a/haltests/net-config-haltests.cpp +++ b/haltests/net-config-haltests.cpp @@ -128,17 +128,18 @@ static bool __found_ap_callback(wifi_manager_ap_h ap, void *user_data) return true; if (!strncmp(ap_name, ap_name_part, ap_name_len)) { - g_free(ap_name); ret = wifi_manager_ap_clone(&g_hWifiAP, ap); EXPECT_EQ(WIFI_MANAGER_ERROR_NONE, ret) << "Unable to clone the AP handle"; if (g_hWifiAP) { rst = WIFI_MANAGER_ERROR_NONE; + g_free(ap_name); return false; } } + + g_free(ap_name); } - g_free(ap_name); return true; }