mount: add a missing return on a error path

Submitted by Andrei Vagin on May 19, 2016, 9:09 p.m.

Details

Message ID 1463692160-1102-1-git-send-email-avagin@openvz.org
State Accepted
Series "mount: add a missing return on a error path"
Commit 9e4c06efa154c57eda7e4bd9f92b358e06d98abb
Headers show

Commit Message

Andrei Vagin May 19, 2016, 9:09 p.m.
From: Andrew Vagin <avagin@virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
---
 criu/mount.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/criu/mount.c b/criu/mount.c
index 87c2791..1b06ea1 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2534,6 +2534,7 @@  static int do_bind_mount(struct mount_info *mi)
 		if (mount(mnt_path, mnt_clean_path, NULL, MS_BIND, NULL)) {
 			pr_perror("Unable to bind-mount %s to %s",
 					mi->bind->mountpoint, mnt_clean_path);
+			return -1;
 		}
 		mnt_path = mnt_clean_path;
 		umount_mnt_path = true;

Comments

Pavel Emelianov May 23, 2016, 4:52 p.m.
Applied