[CRIU] [PATCH] mount: don't leak fd on error path

Andrey Vagin avagin at openvz.org
Wed Apr 2 05:49:31 PDT 2014


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

diff --git a/mount.c b/mount.c
index f999c39..32f0f60 100644
--- a/mount.c
+++ b/mount.c
@@ -844,7 +844,7 @@ int dump_mnt_ns(int ns_pid, int ns_id)
 		return -1;
 
 	if (mntns_collect_root(ns_pid))
-		return -1;
+		goto err;
 
 	pm = parse_mountinfo(ns_pid);
 	if (!pm) {
-- 
1.8.5.3



More information about the CRIU mailing list