Blame SOURCES/0009-obex-client-Fix-leaked_handle.patch

150e62
From 39b638526d9a45d54d2d6e3f175fd7eb057ef8f0 Mon Sep 17 00:00:00 2001
150e62
From: Gopal Tiwari <gtiwari@redhat.com>
150e62
Date: Tue, 31 May 2022 13:11:13 +0530
150e62
Subject: [PATCH BlueZ 09/12] obex-client: Fix leaked_handle
150e62
150e62
While performing static tool analysis using coverity found following
150e62
reports for resouse leak
150e62
150e62
bluez-5.64/tools/obex-client-tool.c:315: leaked_handle: Handle variable
150e62
"sk" going out of scope leaks the handle.
150e62
---
150e62
 tools/obex-client-tool.c | 1 +
150e62
 1 file changed, 1 insertion(+)
150e62
150e62
diff --git a/tools/obex-client-tool.c b/tools/obex-client-tool.c
150e62
index ab9332896..cb0e41247 100644
150e62
--- a/tools/obex-client-tool.c
150e62
+++ b/tools/obex-client-tool.c
150e62
@@ -312,6 +312,7 @@ static GIOChannel *unix_connect(GObexTransportType transport)
150e62
 	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
150e62
 		err = errno;
150e62
 		g_printerr("connect: %s (%d)\n", strerror(err), err);
150e62
+		close(sk);
150e62
 		return NULL;
150e62
 	}
150e62
 
150e62
-- 
150e62
2.26.2
150e62