From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> This fixes resource leak warnings. --- tools/l2cap-tester.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index 505ac79..e4dade2 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -503,6 +503,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm) master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); + close(sk); return -ENODEV; } @@ -701,6 +702,7 @@ static void test_server(const void *test_data) tester_warn("listening on socket failed: %s (%u)", strerror(errno), errno); tester_test_failed(); + close(sk); return; } -- 1.8.3.2 -- 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