summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorIra Cooper <ira@samba.org>2014-01-24 09:54:19 -0500
committerAnand Avati <avati@redhat.com>2014-01-24 23:53:17 -0800
commit580d91eb563e8d8a9eb11dbe1c285541c70dbe16 (patch)
tree26071111cd8a865ea2e4d0b293f086cabd90fe78 /xlators/mgmt
parent1968ec12e62a22fc6e55c4bcc7170d036bf28932 (diff)
glusterd: Free leaked error message.
The way the previous code was written you couldn't tell if the string was from the data area, or allocated, so we switched how the error message is printed, and now free unconditionally. Change-Id: Ia83cf9893acdfb5d537a61cc0bbf4aa7689e483d CID: 1124704 BUG: 789278 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-on: http://review.gluster.org/6779 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 0ddb52b3a1d..963aa076222 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1539,10 +1539,12 @@ glusterd_op_set_volume (dict_t *dict)
if (dict_count == 0) {
ret = glusterd_volset_help (NULL, &op_errstr);
if (ret) {
- op_errstr = (op_errstr)? op_errstr:
- "Volume set help internal error";
- gf_log (this->name, GF_LOG_ERROR, "%s", op_errstr);
+ gf_log (this->name, GF_LOG_ERROR, "%s",
+ (op_errstr)? op_errstr:
+ "Volume set help internal error");
}
+
+ GF_FREE(op_errstr);
goto out;
}