Fixed handle leak while returning error from specific_scan() 12/155712/1
authorNishant Chaprana <n.chaprana@samsung.com>
Mon, 16 Oct 2017 04:18:06 +0000 (09:48 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 16 Oct 2017 04:19:12 +0000 (09:49 +0530)
Change-Id: I2fec8c8788de21619d48b8955c7e8312bf92c491
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/connman.spec
src/technology.c

index 4238f16..c54b2bf 100755 (executable)
@@ -5,7 +5,7 @@
 
 Name:           connman
 Version:        1.29
-Release:        23
+Release:        24
 License:        GPL-2.0+
 Summary:        Connection Manager
 Url:            http://connman.net
index 2c2df83..408c99f 100755 (executable)
@@ -1247,8 +1247,10 @@ static DBusMessage *specific_scan(DBusConnection *conn, DBusMessage *msg, void *
                dbus_message_iter_recurse(&entry, &value2);
                type = dbus_message_iter_get_arg_type(&value2);
                if (g_str_equal(key, "SSID")) {
-                       if (type != DBUS_TYPE_STRING)
+                       if (type != DBUS_TYPE_STRING) {
+                               g_slist_free_full(specific_scan_list, g_free);
                                return __connman_error_invalid_arguments(msg);
+                       }
 
                        scan_type = 1; /* SSID based scan */
                        dbus_message_iter_get_basic(&value2, &name);