From 5cc4a1729b1473c1c00c947bbf119a78bc83647f Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 14 Sep 2015 10:04:13 +0300 Subject: [PATCH] tools/btattach: Fix leak of bt_hci object --- tools/btattach.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/btattach.c b/tools/btattach.c index 3530774af..a025bb07f 100644 --- a/tools/btattach.c +++ b/tools/btattach.c @@ -154,7 +154,8 @@ static int attach_proto(const char *path, unsigned int proto, } bt_hci_send(hci, BT_HCI_CMD_READ_LOCAL_VERSION, NULL, 0, - local_version_callback, NULL, NULL); + local_version_callback, hci, + (bt_hci_destroy_func_t) bt_hci_unref); } return fd; -- 2.47.3