[CRIU] [PATCH 6/8] parasite: close control socket on finalization stage

Andrey Vagin avagin at openvz.org
Fri Jun 14 07:04:57 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 parasite-syscall.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/parasite-syscall.c b/parasite-syscall.c
index 0050faf..8723598 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -783,6 +783,7 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
 	}
 
 	ret = __parasite_execute_daemon(PARASITE_CMD_FINI, ctl, false);
+	close_safe(&ctl->tsock);
 	if (ret)
 		return -1;
 
@@ -851,7 +852,7 @@ int parasite_cure_remote(struct parasite_ctl *ctl)
 		if (parasite_fini_seized(ctl))
 			return -1;
 
-	ctl->tsock = -1;
+	close_safe(&ctl->tsock);
 
 	if (ctl->remote_map) {
 		if (munmap_seized(ctl, (void *)ctl->remote_map, ctl->map_length)) {
-- 
1.8.2



More information about the CRIU mailing list