From: Luiz Augusto von Dentz <luiz.dentz-von@xxxxxxxxx> There is no need to create a new object if disconnected and the device is not permanent/paired. --- src/event.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 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 @@ void btd_event_disconn_complete(bdaddr_t *local, bdaddr_t *peer) 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); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html