diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-07-29 17:20:56 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-01 13:30:31 +0300 |
commit | 833b4dd623e0fda402ee8f4da8316ef31f5b96b1 (patch) | |
tree | 750a4ff63ec6a6d792800023db68647dd09300bf /tools/scotest.c | |
parent | 830c8801ef227f45244cbf47edfe09a8848d43bf (diff) | |
download | bluez-833b4dd623e0fda402ee8f4da8316ef31f5b96b1.tar.gz |
tools/scotest: Fix double close socket
When executing in a child we close(sk) in the beginning. error label
handles parent process error conditions.
Diffstat (limited to 'tools/scotest.c')
-rw-r--r-- | tools/scotest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/scotest.c b/tools/scotest.c index bd650345f..d033ae0b8 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); } } |