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

!7483 Bluetooth: Fix use-after-free bugs caused by sco_sock_timeout

parents 31f83f62 011bbfc4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -82,6 +82,10 @@ static void sco_sock_timeout(struct work_struct *work)
	struct sock *sk;

	sco_conn_lock(conn);
	if (!conn->hcon) {
		sco_conn_unlock(conn);
		return;
	}
	sk = conn->sk;
	if (sk)
		sock_hold(sk);