summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/socket_ip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/socket/socket_ip.c b/source4/lib/socket/socket_ip.c
index cdb75fe021..89b310a23a 100644
--- a/source4/lib/socket/socket_ip.c
+++ b/source4/lib/socket/socket_ip.c
@@ -552,11 +552,13 @@ static struct in6_addr interpret_addr6(const char *name)
char addr[INET6_ADDRSTRLEN];
struct in6_addr dest6;
const char *sp = name;
- char *p = strchr_m(sp, '%');
+ char *p;
int ret;
if (sp == NULL) return in6addr_any;
+ p = strchr_m(sp, '%');
+
if (strcasecmp(sp, "localhost") == 0) {
sp = "::1";
}