diff --git a/lib/libspl/mkdirp.c b/lib/libspl/mkdirp.c index f98e31e2d..2f091883a 100644 --- a/lib/libspl/mkdirp.c +++ b/lib/libspl/mkdirp.c @@ -146,8 +146,10 @@ simplify(const char *str) * bail out if there is nothing there. */ - if (!str) + if (!str) { + errno = ENOENT; return (NULL); + } /* * Get a copy of the argument.