From f33a61086da43af5a5de2ba99b4045a63cf5bd79 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 7 May 2018 06:35:25 -0400 Subject: 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: > BUG: 1576392 > Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e > Signed-off-by: Kotresh HR fixes: bz#1611106 Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e Signed-off-by: Kotresh HR --- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 25193e2a51f..30e1bec96e4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -5645,7 +5645,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; } -- cgit