diff --git a/src/first-free-port.c b/src/first-free-port.c index a6a9df5..1789e85 100644 --- a/src/first-free-port.c +++ b/src/first-free-port.c @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) { } unsigned short *listening_ports = malloc(PORTS_BLOCKS_TO_ALLOW * sizeof(unsigned short)); - get_listening_ports(listening_ports, tcp_table_fptr); + listening_ports = get_listening_ports(listening_ports, tcp_table_fptr); // Check if the current port is available, add while (!is_port_available(current_port, listening_ports)) {