2010-11-10 02:11:48

by Elvis Pfutzenreuter

[permalink] [raw]
Subject: [PATCH] Check HealthApplication path before trying to destroy it

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



2010-11-11 09:27:01

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Check HealthApplication path before trying to destroy it

Hi Elvis,

On Wed, Nov 10, 2010, Elvis Pf?tzenreuter wrote:
> ---
> health/hdp.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)

Pushed upstream. Thanks.

Johan