diff options
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 6 |
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 901e5e1e6..db0ab9cc8 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; |