summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c7
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 282dde0..c336337 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -189,7 +189,7 @@ get_ip_from_addrinfo (struct addrinfo *addr, char **ip)
return NULL;
}
- *ip = strdup (buf);
+ *ip = gf_strdup (buf);
return *ip;
}
@@ -291,8 +291,11 @@ glusterd_is_local_addr (char *hostname)
found = glusterd_is_loopback_localhost (res->ai_addr, hostname)
|| glusterd_interface_search (ip);
- if (found)
+ if (found) {
+ GF_FREE (ip);
goto out;
+ }
+ GF_FREE (ip);
}
out: