diff options
Diffstat (limited to 'vlib-api')
-rw-r--r-- | vlib-api/vlibsocket/socksvr_vlib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vlib-api/vlibsocket/socksvr_vlib.c b/vlib-api/vlibsocket/socksvr_vlib.c index eb8dd3340a1..354c4f1c53d 100644 --- a/vlib-api/vlibsocket/socksvr_vlib.c +++ b/vlib-api/vlibsocket/socksvr_vlib.c @@ -575,12 +575,14 @@ socksvr_api_init (vlib_main_t * vm) rv = ioctl (sockfd, FIONBIO, &one); if (rv < 0) { + close (sockfd); return clib_error_return_unix (0, "FIONBIO"); } rv = setsockopt (sockfd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof (one)); if (rv < 0) { + close (sockfd); return clib_error_return_unix (0, "SO_REUSEADDR"); } |