Skip to content

Commit 9aa77c5

Browse files
committed
only try to parse endpoints if there is something to parse
otherwise, lets try to avoid parsing "" as "0.0.0.0:0", as that doesnt make sense.
1 parent e767e59 commit 9aa77c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

daemon/redis.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,10 @@ static int redis_hash_get_endpoint(struct endpoint *out, const struct redis_hash
923923

924924
if (redis_hash_get_str(&s, h, k))
925925
return -1;
926-
if (endpoint_parse_any(out, s.s))
927-
return -1;
926+
if (s.len) {
927+
if (endpoint_parse_any(out, s.s))
928+
return -1;
929+
}
928930

929931
return 0;
930932
}

0 commit comments

Comments
 (0)