Commit 4b2f4e07 authored by Dan Carpenter's avatar Dan Carpenter Committed by Luiz Augusto von Dentz
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 9b134b16
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}