[PATCH] Check HealthApplication path before trying to destroy it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 health/hdp.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/health/hdp.c b/health/hdp.c
index 1eba8e1..b141fe7 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -376,6 +376,12 @@ static DBusMessage *manager_destroy_application(DBusConnection *conn,
 
 	l = g_slist_find_custom(applications, path, cmp_app);
 
+	if (!l)
+		return g_dbus_create_error(msg,
+					ERROR_INTERFACE ".InvalidArguments",
+					"Invalid arguments in method call, "
+					"no such application");
+
 	app = l->data;
 	applications = g_slist_remove(applications, app);
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux