diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 6b32bd3a0d8..5ef0ce1e5c1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -73,7 +73,7 @@ glusterd_unset_lock_owner (uuid_t owner) return 0; } -static int32_t +int32_t glusterd_is_local_addr (char *hostname) { int32_t ret = -1; @@ -598,11 +598,14 @@ glusterd_brickinfo_from_brick (char *brick, glusterd_brickinfo_t *new_brickinfo = NULL; char *hostname = NULL; char *path = NULL; + char *tmp = NULL; GF_ASSERT (brick); GF_ASSERT (brickinfo); - hostname = strtok (brick, ":"); + tmp = strdup (brick); + + hostname = strtok (tmp, ":"); path = strtok (NULL, ":"); GF_ASSERT (hostname); |