summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-05-07 06:35:25 -0400
committerjiffin tony Thottan <jthottan@redhat.com>2018-06-11 10:18:26 +0000
commitb17d397efa53a7144c25838ba6bacf04703f09af (patch)
tree74e380368c7c8dd368095437ac5f2c02f7b3d900
parent0d744dbae27a3394bc449bf4489957e6f86f4891 (diff)
glusterd/geo-rep: Fix glusterd crash
Using strdump instead of gf_strdup crashes during free if mempool is being used. gf_free checks the magic number in the header which will not be taken care if strdup is used. Backport of: > Patch: https://review.gluster.org/19993/ > Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 57632e3c1a33187d1d23f101f83cd8759142acac) fixes: bz#1577868 Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e Signed-off-by: Kotresh HR <khiremat@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 93d45163fd7..d7d8a718a8b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -5614,7 +5614,7 @@ glusterd_op_gsync_set (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
GD_MSG_GSYNCD_OP_SET_FAILED, GEOREP" is not "
"set up for %s(master) and %s(slave)",
volname, slave);
- *op_errstr = strdup (GEOREP" is not set up");
+ *op_errstr = gf_strdup (GEOREP" is not set up");
goto out;
}