[CRIU] [PATCH 3/4] sk-unix: don't pass a negative value to close()
Andrei Vagin
avagin at virtuozzo.com
Wed May 16 01:55:58 MSK 2018
CID 190174 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
6. negative_returns: fd is passed to a parameter that cannot be negative.
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
criu/sk-unix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index fd80a0b3d..ea314bb9f 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -216,7 +216,7 @@ int kerndat_socket_unix_file(void)
return 0;
}
close(sk);
- close(fd);
+ close_safe(&fd);
kdat.sk_unix_file = true;
--
2.14.3
More information about the CRIU
mailing list