summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishant Chaprana <n.chaprana@samsung.com>2019-09-27 15:10:59 +0530
committerNishant Chaprana <n.chaprana@samsung.com>2019-10-07 11:55:11 +0530
commit4b56bbc05a7e48de6209d03280c60bf53fceb91f (patch)
tree4c3c1f971fa34174e61563b61efa8444d6a0cf9d
parent0702eaff61dc1d59ed60800bd984b2a364849e5d (diff)
downloadconnman-4b56bbc05a7e48de6209d03280c60bf53fceb91f.tar.gz
connman-4b56bbc05a7e48de6209d03280c60bf53fceb91f.tar.bz2
connman-4b56bbc05a7e48de6209d03280c60bf53fceb91f.zip
[Fix] Dereference after free in sta_remove_callback()
Change-Id: I0e3e98f588ea186c514090a86a1a5a9d78e10420 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
-rw-r--r--packaging/connman.spec2
-rw-r--r--plugins/wifi.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index af8e27f0..a2774df4 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -5,7 +5,7 @@
Name: connman
Version: 1.37
-Release: 33
+Release: 34
License: GPL-2.0+
Summary: Connection Manager
Url: http://connman.net
diff --git a/plugins/wifi.c b/plugins/wifi.c
index e74e2d9b..322cfa0a 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -5498,16 +5498,24 @@ static void sta_remove_callback(int result,
if ((result < 0) || (info->wifi->ap_supported != WIFI_AP_SUPPORTED)) {
info->wifi->tethering = false;
connman_technology_tethering_notify(info->technology, false);
+#if !defined TIZEN_EXT
g_free(info->ifname);
g_free(info->ssid);
g_free(info);
+#endif /* !defined TIZEN_EXT */
if (info->wifi->ap_supported == WIFI_AP_SUPPORTED) {
g_free(info->wifi->tethering_param->ssid);
g_free(info->wifi->tethering_param);
info->wifi->tethering_param = NULL;
}
+#if defined TIZEN_EXT
+
+ g_free(info->ifname);
+ g_free(info->ssid);
+ g_free(info);
+#endif /* defined TIZEN_EXT */
return;
}