summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-07-29 11:53:49 +0530
committerAnand Avati <avati@gluster.com>2011-07-29 03:30:05 -0700
commit44598a525afadf2602733d1da2dfa767b5b857f2 (patch)
tree66eb5dad2284f4b70ee8b81b16ab81c53693dfd1 /xlators
parent5d99cd2833a8e6a9452c3f8c3785ae96154fb63b (diff)
nfs: free the allocated string after its usage
Change-Id: Ia29eb582963317538865fbc461dfb942ba45da5c BUG: 3039 Reviewed-on: http://review.gluster.com/122 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-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;
}