Fix creating device object on disconnect complete event
There is no need to create a new object if disconnected and the device is
not permanent/paired.
diff --git a/src/event.c b/src/event.c
index b979a8e..ba8f84a 100644
--- a/src/event.c
+++ b/src/event.c
@@ -697,7 +697,10 @@
DBG("");
- if (!get_adapter_and_device(local, peer, &adapter, &device, TRUE))
+ if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE))
+ return;
+
+ if (!device)
return;
adapter_remove_connection(adapter, device);