summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorIra Cooper <ira@samba.org>2014-01-21 22:46:59 -0500
committerAnand Avati <avati@redhat.com>2014-01-24 23:49:37 -0800
commit1968ec12e62a22fc6e55c4bcc7170d036bf28932 (patch)
tree8b08e773a581cb5c3a6323f6ccec9ea5445bcda3 /xlators/mgmt/glusterd/src
parentc0ac21222383315b9fe84ac7c0afdf01e3ecef7b (diff)
mgmt: Fix memory leak of brickid from gf_asprintf.
No GF_FREE, so one was put into the return path with proper checking. Change-Id: Idde2803608409dcbf216062f83b7f4493946ba70 CID: 1124718 BUG: 789278 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-on: http://review.gluster.org/6755 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 4a88b5b..384a974 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1295,11 +1295,14 @@ glusterd_brick_connect (glusterd_volinfo_t *volinfo,
glusterd_brick_rpc_notify,
brickid);
synclock_lock (&priv->big_lock);
- if (ret)
+ if (ret) {
+ GF_FREE (brickid);
goto out;
+ }
brickinfo->rpc = rpc;
}
out:
+
gf_log ("", GF_LOG_DEBUG, "Returning %d", ret);
return ret;
}