summaryrefslogtreecommitdiffstats
path: root/hcid/agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/agent.c')
-rw-r--r--hcid/agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/agent.c b/hcid/agent.c
index da3fb319..91dbd2d9 100644
--- a/hcid/agent.c
+++ b/hcid/agent.c
@@ -158,8 +158,6 @@ static void agent_free(struct agent *agent)
agent_pincode_cb pincode_cb;
agent_cb cb;
- agent_cancel(agent);
-
dbus_error_init(&err);
dbus_set_error_const(&err, "org.bluez.Error.Failed", "Canceled");
@@ -174,6 +172,8 @@ static void agent_free(struct agent *agent)
}
dbus_error_free(&err);
+
+ agent_cancel(agent);
}
if (!agent->exited) {