diff options
author | Dan Carpenter | 2022-07-26 18:13:44 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz | 2022-07-26 13:32:40 -0700 |
commit | 4b2f4e072fb2599b6a2e5e277f0d2b5705eaa630 (patch) | |
tree | 68400f3da6163d14d7ca656cc832ab48a4757156 /net/bluetooth | |
parent | 9b134b1694ec8926926ba6b7b80884ea829245a0 (diff) |
Bluetooth: mgmt: Fix double free on error path
Don't call mgmt_pending_remove() twice (double free).
Fixes: 6b88eff43704 ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index ae758ab1b558..2f91a8c2b678 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -4723,7 +4723,6 @@ static int __add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev, else status = MGMT_STATUS_FAILED; - mgmt_pending_remove(cmd); goto unlock; } |