socket-handler: Fix realloc size
We want to allocate n_clients worth of struct client, not n_clients
worth of pointers.
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/socket-handler.c b/socket-handler.c
index 8b915e9..68a340f 100644
--- a/socket-handler.c
+++ b/socket-handler.c
@@ -61,7 +61,8 @@
sh->n_clients--;
memmove(&sh->clients[idx], &sh->clients[idx+1],
sizeof(*sh->clients) * (sh->n_clients - idx));
- sh->clients = realloc(sh->clients, sizeof(sh->clients) * sh->n_clients);
+ sh->clients = realloc(sh->clients,
+ sizeof(*sh->clients) * sh->n_clients);
}
static enum poller_ret client_poll(struct handler *handler,