X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fmount_zfs%2Fmount_zfs.c;h=aff9e100399a50426296d1af9593c9e0e6c841d0;hb=f47c42e2143ccf83bb5ddca4251c9db14859a0b5;hp=204f9fa14679a7818586b4139c1ad482fd30e517;hpb=ae26d0465a234d7b340566287908c78fe24901e1;p=zfs.git diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c index 204f9fa..aff9e10 100644 --- a/cmd/mount_zfs/mount_zfs.c +++ b/cmd/mount_zfs/mount_zfs.c @@ -228,7 +228,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 '/' */