mirror of
https://git.sr.ht/~sircmpwn/gmnisrv
synced 2024-11-03 06:07:17 -05:00
disconnect_client: free more client resources
This commit is contained in:
parent
6bc9c4deb9
commit
e9641dbf1e
@ -188,8 +188,15 @@ disconnect_client(struct gmnisrv_server *server, struct gmnisrv_client *client)
|
|||||||
if (client->bio) {
|
if (client->bio) {
|
||||||
BIO_free_all(client->bio);
|
BIO_free_all(client->bio);
|
||||||
}
|
}
|
||||||
|
if (client->ssl) {
|
||||||
|
SSL_free(client->ssl);
|
||||||
|
}
|
||||||
|
if (client->body) {
|
||||||
|
fclose(client->body);
|
||||||
|
}
|
||||||
close(client->sockfd);
|
close(client->sockfd);
|
||||||
free(client->meta);
|
free(client->meta);
|
||||||
|
free(client->path);
|
||||||
|
|
||||||
size_t index = (client - server->clients) / sizeof(struct gmnisrv_client);
|
size_t index = (client - server->clients) / sizeof(struct gmnisrv_client);
|
||||||
memmove(client, &client[1], &server->clients[server->clientsz] - client);
|
memmove(client, &client[1], &server->clients[server->clientsz] - client);
|
||||||
|
Loading…
Reference in New Issue
Block a user