From 6cdb0201e472a79ddb01ba1d78e327f08b46415a Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Mon, 16 Oct 2017 09:48:06 +0530 Subject: [PATCH] Fixed handle leak while returning error from specific_scan() Change-Id: I2fec8c8788de21619d48b8955c7e8312bf92c491 Signed-off-by: Nishant Chaprana --- packaging/connman.spec | 2 +- src/technology.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); -- 2.7.4