projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76da8a4
)
l2cap-tester: Fix leaked_handle
author
Gopal Tiwari
<gtiwari@redhat.com>
Tue, 31 May 2022 07:41:11 +0000
(13:11 +0530)
committer
Ayush Garg
<ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000
(14:55 +0530)
While performing static tool analysis using coverity found following
reports for resouse leak
bluez-5.64/tools/l2cap-tester.c:1712: leaked_handle: Handle variable
"new_sk" going out of scope leaks the handle.
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/l2cap-tester.c
patch
|
blob
|
history
diff --git
a/tools/l2cap-tester.c
b/tools/l2cap-tester.c
index
d78b1e2
..
3f04640
100755
(executable)
--- a/
tools/l2cap-tester.c
+++ b/
tools/l2cap-tester.c
@@
-1709,6
+1709,7
@@
static gboolean l2cap_listen_cb(GIOChannel *io, GIOCondition cond,
if (!check_mtu(data, new_sk)) {
tester_test_failed();
+ close(new_sk);
return FALSE;
}