summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/nfs/lib/src/rpcsvc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc.c b/xlators/nfs/lib/src/rpcsvc.c
index 6e0e020e72a..7da04b2f15b 100644
--- a/xlators/nfs/lib/src/rpcsvc.c
+++ b/xlators/nfs/lib/src/rpcsvc.c
@@ -658,10 +658,13 @@ nfs_rpcsvc_volume_allowed (dict_t *options, char *volname)
GF_FREE (srchstr);
srchstr = globalrule;
ret = dict_get_str (options, srchstr, &addrstr);
+ srchstr = NULL;
} else
ret = dict_get_str (options, srchstr, &addrstr);
out:
+ if (srchstr != NULL)
+ GF_FREE (srchstr);
return addrstr;
}