From b35bf098a08b8dae93ea0f4a6a949bdedfa17ffe Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 9 Feb 2016 19:17:16 +0200 Subject: [PATCH] drivers/nble: Clarify connection reference counting Change-Id: I9ed8859cb32f240d131bb9d4ff774e2f805b16d3 Signed-off-by: Johan Hedberg --- drivers/nble/conn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nble/conn.c b/drivers/nble/conn.c index 23c184bb26d..348690b199c 100644 --- a/drivers/nble/conn.c +++ b/drivers/nble/conn.c @@ -204,7 +204,9 @@ void on_ble_gap_disconnect_evt(const struct ble_gap_disconnect_evt *ev) BT_DBG("conn %p handle %u", conn, ev->conn_handle); + /* Drop the reference given by lookup_handle() */ bt_conn_unref(conn); + /* Drop the initial reference from conn_new() */ bt_conn_unref(conn); }