mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-08 05:10:05 +03:00
fix #302
This commit is contained in:
parent
1a3341c2a4
commit
a704c7f7f5
2
common.c
2
common.c
@ -188,7 +188,7 @@ int start_listen_sockets(struct listen_endpoint *sockfd[])
|
||||
|
||||
for (addr = start_addr; addr; addr = addr->ai_next) {
|
||||
num_addr++;
|
||||
*sockfd = realloc(*sockfd, num_addr * sizeof(*sockfd));
|
||||
*sockfd = realloc(*sockfd, num_addr * sizeof(*sockfd[0]));
|
||||
(*sockfd)[num_addr-1].socketfd = listen_single_addr(addr, keepalive, udp);
|
||||
(*sockfd)[num_addr-1].type = udp ? SOCK_DGRAM : SOCK_STREAM;
|
||||
if (cfg.verbose)
|
||||
|
Loading…
x
Reference in New Issue
Block a user