summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-geo-rep.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 901e5e1e..db0ab9cc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -249,13 +249,15 @@ glusterd_urltransform (runner_t *runner, char ***linearrp)
line[len - 1] = '\0';
if (arr_idx == arr_len) {
+ void *p = linearr;
arr_len <<= 1;
- linearr = GF_REALLOC (linearr, arr_len);
- if (!linearr) {
+ p = GF_REALLOC (linearr, arr_len);
+ if (!p) {
GF_FREE (line);
error = _gf_true;
goto out;
}
+ linearr = p;
}
linearr[arr_idx] = line;