From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> When executing in a child we close(sk) in the beginning. error label handles parent process error conditions. --- tools/scotest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/scotest.c b/tools/scotest.c index bd65034..d033ae0 100644 --- a/tools/scotest.c +++ b/tools/scotest.c @@ -210,7 +210,7 @@ static void do_listen(void (*handler)(int sk)) strerror(errno), errno); if (!defer_setup) { close(nsk); - goto error; + exit(1); } } @@ -227,7 +227,7 @@ static void do_listen(void (*handler)(int sk)) if (defer_setup < 0) { close(nsk); - goto error; + exit(1); } } -- 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