mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
Bluetooth: ISO: unlock on error path in iso_sock_setsockopt()
Call release_sock(sk); before returning on this error path.
Fixes: ccf74f2390
("Bluetooth: Add BTPROTO_ISO socket type")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
332f1795ca
commit
164dac9755
@ -1177,8 +1177,10 @@ static int iso_sock_setsockopt(struct socket *sock, int level, int optname,
|
||||
}
|
||||
|
||||
len = min_t(unsigned int, sizeof(qos), optlen);
|
||||
if (len != sizeof(qos))
|
||||
return -EINVAL;
|
||||
if (len != sizeof(qos)) {
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
memset(&qos, 0, sizeof(qos));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user