[CRIU] [PATCH 2/2] autofs: do not leak file handles on exit from access_autofs_mount

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Mon May 16 03:31:38 PDT 2016


Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 criu/autofs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/criu/autofs.c b/criu/autofs.c
index 1a8876b..f764d20 100644
--- a/criu/autofs.c
+++ b/criu/autofs.c
@@ -404,13 +404,13 @@ close_autofs_mnt:
 restore_pid_ns:
 	if (restore_ns(old_pid_ns, &pid_ns_desc)) {
 		pr_err("failed to restore pid namespace\n");
-		return -1;
+		err = -1;
 	}
 	old_pid_ns = -1;
 restore_mnt_ns:
 	if (restore_ns(old_mnt_ns, &mnt_ns_desc)) {
 		pr_err("failed to restore mount namespace\n");
-		return -1;
+		err = -1;
 	}
 close_old_pid_ns:
 	if (old_pid_ns >= 0)



More information about the CRIU mailing list