提交 5a3ef03a 编写于 作者: P Pan Bian 提交者: Marcel Holtmann

Bluetooth: drop HCI device reference before return

Call hci_dev_put() to decrement reference count of HCI device hdev if
fails to duplicate memory.

Fixes: 0b26ab9d ("Bluetooth: AMP: Handle Accept phylink command status evt")
Signed-off-by: NPan Bian <bianpan2016@163.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 bf6a4e30
......@@ -512,6 +512,7 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
assoc = kmemdup(req->amp_assoc, assoc_len, GFP_KERNEL);
if (!assoc) {
amp_ctrl_put(ctrl);
hci_dev_put(hdev);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册