[PATCH BlueZ 2/2] Possible bug fix nsk replaced with sk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



During the review of the code path found this scenario where
seems like nsk is replaced with sk. Where as sk is already free.
Fixing it.
---
 tools/rctest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/rctest.c b/tools/rctest.c
index 6d84e07..909bc68 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -376,7 +376,7 @@ static void do_listen(void (*handler)(int sk))
 			//goto error;
 		}
 
-		if (priority > 0 && setsockopt(sk, SOL_SOCKET, SO_PRIORITY,
+		if (priority > 0 && setsockopt(nsk, SOL_SOCKET, SO_PRIORITY,
 					&priority, sizeof(priority)) < 0) {
 			syslog(LOG_ERR, "Can't set socket priority: %s (%d)",
 						strerror(errno), errno);
-- 
2.7.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux