summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-09-10 14:06:27 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-09-15 14:53:03 -0400
commitca18ee413a7cb6f09885778039225e58bae0d607 (patch)
tree69f4e5cd70061b214b05e35e9fe0168de92a8c4f
parent9a10987a2f160a44a638c9a35994ca6e3089696e (diff)
downloadlinux-next-ca18ee413a7cb6f09885778039225e58bae0d607.tar.gz
linux-next-ca18ee413a7cb6f09885778039225e58bae0d607.zip
Bluetooth: ISO: Fix parent socket leak in iso_conn_ready()
iso_get_sock() returns the parent socket with a reference held, which is dropped by sock_put() once the child socket has been set up. The error path taken when iso_sock_alloc() fails only calls release_sock() and returns, leaking the reference and thus the parent socket itself. Drop the reference on that path as well. Fixes: fa224d0c094a ("Bluetooth: ISO: Reassociate a socket with an active BIS") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-rw-r--r--net/bluetooth/iso.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 75bfd5938b2e..4de332b8901f 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2289,6 +2289,7 @@ static void iso_conn_ready(struct iso_conn *conn)
BTPROTO_ISO, GFP_ATOMIC, 0);
if (!sk) {
release_sock(parent);
+ sock_put(parent);
return;
}