From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> --- tools/avinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/avinfo.c b/tools/avinfo.c index 7d58e25..d9f809b 100644 --- a/tools/avinfo.c +++ b/tools/avinfo.c @@ -583,6 +583,7 @@ static int l2cap_connect(bdaddr_t *src, bdaddr_t *dst) if (bind(sk, (struct sockaddr *) &l2a, sizeof(l2a)) < 0) { printf("Bind failed. %s (%d)\n", strerror(errno), errno); + close(sk); return -errno; } @@ -593,6 +594,7 @@ static int l2cap_connect(bdaddr_t *src, bdaddr_t *dst) if (connect(sk, (struct sockaddr *) &l2a, sizeof(l2a)) < 0) { printf("Connect failed. %s(%d)\n", strerror(errno), errno); + close(sk); return -errno; } -- 1.9.1 -- 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