aboutsummaryrefslogtreecommitdiff
path: root/handler.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-03 13:36:46 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-03 13:40:12 +0200
commit15c905f150927b16bd3d1ffe62d2bc9d92da26c5 (patch)
treefd2ed0eedcfc1d32a8bb5d5c45d26aca6042db5a /handler.c
parent5a6c92d69bbb307ca09ac2ecbad54df4f2394bea (diff)
downloadslcl-15c905f150927b16bd3d1ffe62d2bc9d92da26c5.tar.gz
server.c: Fix undefined behaviour on >1 clients
server.c kept an array of all of its active clients, calling realloc(3) everytime its size had to be modified. However, reallocating this array had the undesired consequence of moving other active clients to other memory locations. Potentially, this would result in dangling pointers from other components that also kept pointers to struct server_client instances e.g.: handler.c. For this reason, the array-based approach has been completely dropped, in favour of a doubly-linked list.
Diffstat (limited to 'handler.c')
0 files changed, 0 insertions, 0 deletions