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

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

parents 199d2e99 33f2d9d6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2962,6 +2962,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;