diff options
Diffstat (limited to 'bind-mount.c')
-rw-r--r-- | bind-mount.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bind-mount.c b/bind-mount.c index 72fd3c5..d5c45b8 100644 --- a/bind-mount.c +++ b/bind-mount.c @@ -244,8 +244,11 @@ bind_mount (int proc_fd, unsigned long current_flags, new_flags; int i; - if (mount (src, dest, NULL, MS_MGC_VAL | MS_BIND | (recursive ? MS_REC : 0), NULL) != 0) - return 1; + if (src) + { + if (mount (src, dest, NULL, MS_MGC_VAL | MS_BIND | (recursive ? MS_REC : 0), NULL) != 0) + return 1; + } current_flags = get_mountflags (proc_fd, dest); |