Displaying 2 results from an estimated 2 matches for "29ca40d".
2017 Mar 06
0
[PATCH 6/6] p2v: fix possible close(-1) issue
Make sure the error handler (i.e. the code after the 'cleanup' label)
does not attempt to call close(-1), in case 'sockfd' is not initialized
yet.
---
p2v/nbd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/p2v/nbd.c b/p2v/nbd.c
index ee21005..29ca40d 100644
--- a/p2v/nbd.c
+++ b/p2v/nbd.c
@@ -722,7 +722,8 @@ wait_for_nbd_server_to_start (const char *ipaddr, int port)
result = 0;
cleanup:
- close (sockfd);
+ if (sockfd >= 0)
+ close (sockfd);
return result;
}
--
2.9.3
2017 Mar 06
7
[PATCH 0/6] Various Coverity fixes #2
Hi,
this patch series fixes few more issues discovered by Coverity.
Thanks,
Pino Toscano (6):
tail: check the return value pf guestfs_set_pgroup
daemon: btrfs: check end_stringsbuf return values everywhere
java: use cleanup handlers for structs (lists) as return values
lib: qemu: improve handling of FILE*
p2v: check more return values
p2v: fix possible close(-1) issue
cat/tail.c