diff options
author | Rajesh Amaravathi <rajesh@redhat.com> | 2012-03-16 16:59:45 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-03-17 23:30:00 -0700 |
commit | cba2f84cd084fdf005977690dce3c54fa9f8b133 (patch) | |
tree | 6faf6f53a712395b84eadf694e49a5f611764729 | |
parent | fb406f942befbe48eec75043d89ecd0824f91dd6 (diff) |
rpc-lib: memleak fix in rpcsvc_volume_allowed
Change-Id: Iaa6baa4a3e036b2b5c808ea5e79017fffeb80a24
BUG: 801754
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2956
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 11 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 398bcdab805..515ec672732 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -2403,14 +2403,15 @@ rpcsvc_volume_allowed (dict_t *options, char *volname) goto out; } - if (!dict_get (options, srchstr)) { - GF_FREE (srchstr); - srchstr = globalrule; - ret = dict_get_str (options, srchstr, &addrstr); - } else + if (!dict_get (options, srchstr)) + ret = dict_get_str (options, globalrule, &addrstr); + else ret = dict_get_str (options, srchstr, &addrstr); out: + if (srchstr) + GF_FREE (srchstr); + return addrstr; } diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 2bff9c87b58..059246d972c 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3776,7 +3776,7 @@ err: } -int + int dht_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, dict_t *params) { |