summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGopal Tiwari <gtiwari@redhat.com>2022-05-31 13:11:09 +0530
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-05-31 12:51:19 -0700
commitf4743109f381a4d53b476c5b77c7c68a6aa40b59 (patch)
tree66aad15483a449ed7e54cebeb8129fbaf49fd7fe /tools
parentfc57aa92a4f32f7c0f38198e6d26b529b537a047 (diff)
downloadbluez-f4743109f381a4d53b476c5b77c7c68a6aa40b59.tar.gz
cltest: Fix leaked_handle
While performing static tool analysis using coverity found following reports for resouse leak bluez-5.64/tools/cltest.c:75: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
Diffstat (limited to 'tools')
-rw-r--r--tools/cltest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/cltest.c b/tools/cltest.c
index 2766fcd23..250c93cc7 100644
--- a/tools/cltest.c
+++ b/tools/cltest.c
@@ -72,6 +72,7 @@ static bool send_message(const bdaddr_t *src, const bdaddr_t *dst,
return false;
}
+ close(fd);
return true;
}