From: Gopal Tiwari Date: Tue, 31 May 2022 07:41:09 +0000 (+0530) Subject: cltest: Fix leaked_handle X-Git-Tag: accepted/tizen/unified/20230608.164325~223 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ecde03a3ae8a3fda5018a9973e205ac20cb7626;p=platform%2Fupstream%2Fbluez.git 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. Signed-off-by: Manika Shrivastava Signed-off-by: Ayush Garg --- diff --git a/tools/cltest.c b/tools/cltest.c index 2766fcd..250c93c 100755 --- 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; }