tools: Fix handle leak in rfcomm
authorIldar Kamaletdinov <i.kamaletdinov@omp.ru>
Sat, 7 May 2022 17:35:04 +0000 (20:35 +0300)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit34ba6f5be3a7f36b1200cde01f05cf71b787ebd8
tree74f141bc1c60d870d296f8c78827a51b8dce6b2c
parent54fa6c51f987dba465eabdf59e9322521f14ac85
tools: Fix handle leak in rfcomm

Some branches of execution can make handle (socket) leakage.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/rfcomm.c