OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf6a4e3
)
Bluetooth: drop HCI device reference before return
author
Pan Bian
<bianpan2016@163.com>
Thu, 21 Jan 2021 07:34:19 +0000
(23:34 -0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Mon, 25 Jan 2021 15:13:52 +0000
(16:13 +0100)
Call hci_dev_put() to decrement reference count of HCI device hdev if
fails to duplicate memory.
Fixes:
0b26ab9dce74
("Bluetooth: AMP: Handle Accept phylink command status evt")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/a2mp.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/a2mp.c
b/net/bluetooth/a2mp.c
index
cc26e4c
..
463bad5
100644
(file)
--- a/
net/bluetooth/a2mp.c
+++ b/
net/bluetooth/a2mp.c
@@
-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;
}