From f9c231ec12c2233557bfbb58feb87a1fcddf224a Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Fri, 5 Aug 2016 10:10:18 -0400 Subject: vpp-189 Clean up more coverity warnings Time to make the donuts Change-Id: I528937800f7daefce19723dda0216e58d857942c Signed-off-by: Dave Barach --- vlib-api/vlibsocket/socksvr_vlib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vlib-api/vlibsocket') 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"); } -- cgit 1.2.3-korg