From 984a6511c4cf2a9df5e415a0b6e7d4a575477a62 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 30 Aug 2011 10:51:36 +0300 Subject: [PATCH] obexd: Fix missing NULL check in agent_cancel The agent_cancel function can potentially be called when there's no agent registered, so there should be proper handling of this situation. --- obexd/src/manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/obexd/src/manager.c b/obexd/src/manager.c index 241c9af01..e162e7f5d 100644 --- a/obexd/src/manager.c +++ b/obexd/src/manager.c @@ -452,6 +452,9 @@ static void agent_cancel() { DBusMessage *msg; + if (agent == NULL) + return; + msg = dbus_message_new_method_call(agent->bus_name, agent->path, "org.openobex.Agent", "Cancel"); -- 2.47.3