Commit 557f5935 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

parasite: close control socket on finalization stage

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a45f07e2
...@@ -716,6 +716,7 @@ static int parasite_fini_seized(struct parasite_ctl *ctl) ...@@ -716,6 +716,7 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
} }
ret = __parasite_execute_daemon(PARASITE_CMD_FINI, ctl, false); ret = __parasite_execute_daemon(PARASITE_CMD_FINI, ctl, false);
close_safe(&ctl->tsock);
if (ret) if (ret)
return -1; return -1;
...@@ -784,7 +785,7 @@ int parasite_cure_remote(struct parasite_ctl *ctl) ...@@ -784,7 +785,7 @@ int parasite_cure_remote(struct parasite_ctl *ctl)
if (parasite_fini_seized(ctl)) if (parasite_fini_seized(ctl))
return -1; return -1;
ctl->tsock = -1; close_safe(&ctl->tsock);
if (ctl->remote_map) { if (ctl->remote_map) {
if (munmap_seized(ctl, (void *)ctl->remote_map, ctl->map_length)) { if (munmap_seized(ctl, (void *)ctl->remote_map, ctl->map_length)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment