Unverified Commit b5ee721d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11228 Bluetooth: MGMT: Add error handling to pair_device()

parents 9be0c95e 6f6d99bf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3449,6 +3449,10 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
		 * will be kept and this function does nothing.
		 */
		p = hci_conn_params_add(hdev, &cp->addr.bdaddr, addr_type);
		if (!p) {
			err = -EIO;
			goto unlock;
		}

		if (p->auto_connect == HCI_AUTO_CONN_EXPLICIT)
			p->auto_connect = HCI_AUTO_CONN_DISABLED;