From: Nishant Chaprana Date: Mon, 16 Oct 2017 04:18:06 +0000 (+0530) Subject: Fixed handle leak while returning error from specific_scan() X-Git-Tag: submit/tizen/20171016.080431~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fconnman.git;a=commitdiff_plain;h=6cdb0201e472a79ddb01ba1d78e327f08b46415a Fixed handle leak while returning error from specific_scan() Change-Id: I2fec8c8788de21619d48b8955c7e8312bf92c491 Signed-off-by: Nishant Chaprana --- diff --git a/packaging/connman.spec b/packaging/connman.spec index 4238f16..c54b2bf 100755 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -5,7 +5,7 @@ Name: connman Version: 1.29 -Release: 23 +Release: 24 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net diff --git a/src/technology.c b/src/technology.c index 2c2df83..408c99f 100755 --- a/src/technology.c +++ b/src/technology.c @@ -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);