Bluetooth: hci_conn: Fix memory leaks
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 4 Jan 2023 06:46:23 +0000 (14:46 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 17 Jan 2023 23:59:02 +0000 (15:59 -0800)
commit3aa21311f36d8a2730c7ccef37235e951f23927b
tree7b27fdf12dd7418773c15e95a05b1fe60594ffb9
parent3a4d29b6d631bb00236a98887e1039bbfc1b6ab5
Bluetooth: hci_conn: Fix memory leaks

When hci_cmd_sync_queue() failed in hci_le_terminate_big() or
hci_le_big_terminate(), the memory pointed by variable d is not freed,
which will cause memory leak. Add release process to error path.

Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_conn.c