socket-handler: Use array of pointers for clients array
When a client registers a poller, it uses a pointer to the struct client
in the poller's data field.
Since the clients are allocated in the socket handler's ->clients array
directly, and this array may be realloc()ed, a client's pointer may
change when other clients connect or disconnect.
This change uses separate allocations for the clients and the
sh->clients array, so the client pointers remain valid for the life of
the client.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
1 file changed