[CRIU] [PATCH 18/18] img-remote: don't call close for a negative value

Andrei Vagin avagin at openvz.org
Thu Nov 9 22:21:12 MSK 2017


From: Andrei Vagin <avagin at virtuozzo.com>

CID 176805 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
6. negative_returns: cli_fd is passed to a parameter that cannot be negative.

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 criu/img-remote.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/criu/img-remote.c b/criu/img-remote.c
index f812c52d5..5ab70668b 100644
--- a/criu/img-remote.c
+++ b/criu/img-remote.c
@@ -629,7 +629,6 @@ void *accept_local_image_connections(void *port)
 		if (cli_fd < 0) {
 			if (!finished)
 				pr_perror("Unable to accept local image connection");
-			close(cli_fd);
 			return NULL;
 		}
 
-- 
2.13.6



More information about the CRIU mailing list