diff options
Diffstat (limited to 'cmd/mount_zfs/mount_zfs.c')
-rw-r--r-- | cmd/mount_zfs/mount_zfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c index fbb954acd..090c915ce 100644 --- a/cmd/mount_zfs/mount_zfs.c +++ b/cmd/mount_zfs/mount_zfs.c @@ -220,7 +220,9 @@ parse_dataset(char *dataset) char cwd[PATH_MAX]; int len; - (void) getcwd(cwd, PATH_MAX); + if (getcwd(cwd, PATH_MAX) == NULL) + return (dataset); + len = strlen(cwd); /* Do not add one when cwd already ends in a trailing '/' */ |