aboutsummaryrefslogtreecommitdiffstats
path: root/vlib-api/vlibsocket
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-08-05 10:10:18 -0400
committerDave Barach <dave@barachs.net>2016-08-05 10:10:38 -0400
commitf9c231ec12c2233557bfbb58feb87a1fcddf224a (patch)
tree6ee8846be9a6c79d68d0364c00cc58b2f3547ddd /vlib-api/vlibsocket
parent56faee837281c7f9c28aa40dbf0f6e4620b76be8 (diff)
vpp-189 Clean up more coverity warnings
Time to make the donuts Change-Id: I528937800f7daefce19723dda0216e58d857942c Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib-api/vlibsocket')
-rw-r--r--vlib-api/vlibsocket/socksvr_vlib.c2
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");
}