Message ID | 20131008171938.GL25712@lenny.home.zabbo.net (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/cmds-send.c b/cmds-send.c index 374d040..81b3e49 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -72,6 +72,9 @@ int find_mount_root(const char *path, char **mount_root) close(fd); mnttab = fopen("/proc/mounts", "r"); + if (!mnttab) + return -errno; + while ((ent = getmntent(mnttab))) { len = strlen(ent->mnt_dir); if (strncmp(ent->mnt_dir, path, len) == 0) {