Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Check HealthApplication path before trying to destroy it
@ 2010-11-10  2:11 Elvis Pfützenreuter
  2010-11-11  9:27 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Elvis Pfützenreuter @ 2010-11-10  2:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: epx

---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-11  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-10  2:11 [PATCH] Check HealthApplication path before trying to destroy it Elvis Pfützenreuter
2010-11-11  9:27 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox