1
0
Fork 0
forked from ahurac/dotfiles

first-free-port : correction d'un bug de free

This commit is contained in:
Hippolyte Chauvin 2023-12-01 11:34:09 +01:00
parent ea0ca0a100
commit 9bc42d3c4d

View file

@ -94,7 +94,7 @@ int main(int argc, char *argv[]) {
} }
unsigned short *listening_ports = malloc(PORTS_BLOCKS_TO_ALLOW * sizeof(unsigned short)); 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 // Check if the current port is available, add
while (!is_port_available(current_port, listening_ports)) { while (!is_port_available(current_port, listening_ports)) {