a3470f
From 7a2bf65414368999295993cdbbee4060ca495951 Mon Sep 17 00:00:00 2001
a3470f
From: Kotresh HR <khiremat@redhat.com>
a3470f
Date: Mon, 7 May 2018 06:35:25 -0400
a3470f
Subject: [PATCH 266/271] glusterd/geo-rep: Fix glusterd crash
a3470f
a3470f
Using strdump instead of gf_strdup crashes
a3470f
during free if mempool is being used.
a3470f
gf_free checks the magic number in the
a3470f
header which will not be taken care if
a3470f
strdup is used.
a3470f
a3470f
Uptream reference:
a3470f
   > fixes: bz#1576392
a3470f
   > Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e
a3470f
   > Patch: https://review.gluster.org/19993
a3470f
a3470f
BUG: 1570586
a3470f
Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e
a3470f
Signed-off-by: Kotresh HR <khiremat@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/138670
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 +-
a3470f
 1 file changed, 1 insertion(+), 1 deletion(-)
a3470f
a3470f
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
a3470f
index dff8065..a1251ae 100644
a3470f
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
a3470f
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
a3470f
@@ -5637,7 +5637,7 @@ glusterd_op_gsync_set (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
a3470f
                                 GD_MSG_GSYNCD_OP_SET_FAILED, GEOREP" is not "
a3470f
                                 "set up for %s(master) and %s(slave)",
a3470f
                                 volname, slave);
a3470f
-                        *op_errstr = strdup (GEOREP" is not set up");
a3470f
+                        *op_errstr = gf_strdup (GEOREP" is not set up");
a3470f
                         goto out;
a3470f
                 }
a3470f
 
a3470f
-- 
a3470f
1.8.3.1
a3470f