Skip to content

Commit

Permalink
Bluetooth: mgmt: Fix double free on error path
Browse files Browse the repository at this point in the history
Don't call mgmt_pending_remove() twice (double free).

Fixes: 6b88eff ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
  • Loading branch information
Dan Carpenter authored and Vudentz committed Jul 26, 2022
1 parent 9b134b1 commit 4b2f4e0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4b2f4e0

Please sign in to comment.