[Fix] Dereference after free in sta_remove_callback() 96/214896/3
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 27 Sep 2019 09:40:59 +0000 (15:10 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 7 Oct 2019 06:25:11 +0000 (11:55 +0530)
Change-Id: I0e3e98f588ea186c514090a86a1a5a9d78e10420
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/connman.spec
plugins/wifi.c

index af8e27f..a2774df 100644 (file)
@@ -5,7 +5,7 @@
 
 Name:           connman
 Version:        1.37
-Release:        33
+Release:        34
 License:        GPL-2.0+
 Summary:        Connection Manager
 Url:            http://connman.net
index e74e2d9..322cfa0 100644 (file)
@@ -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;
        }