summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/nfs/server/src/mount3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index 30005846b41..9c57f280c6a 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -425,6 +425,9 @@ __volume_subdir (char *dirpath, char **volname)
if (!subdir)
goto out;
+ if (!volname)
+ goto out;
+
if (!*volname)
goto out;
@@ -683,7 +686,7 @@ mnt3_resolve_export_subdir (rpcsvc_request_t *req, struct mount3_state *ms,
if (!volume_subdir)
goto err;
- ret = mnt3_resolve_subdir (req, ms, exp, exp->expname);
+ ret = mnt3_resolve_subdir (req, ms, exp, volume_subdir);
if (ret < 0) {
gf_log (GF_MNT, GF_LOG_ERROR, "Failed to resolve export dir: %s"
, exp->expname);