Check the result of calloc in handle_logon_request (#1498)

This commit is contained in:
Michael Jones 2024-05-27 13:30:49 -05:00 committed by GitHub
parent a32d1a2704
commit 846f717059
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3290,6 +3290,9 @@ static void handle_logon_request(ioa_socket_handle s, struct http_request *hr) {
struct admin_session *as = (struct admin_session *)s->special_session;
if (!as) {
as = (struct admin_session *)calloc(sizeof(struct admin_session), 1);
if (!as) {
return;
}
s->special_session = as;
s->special_session_size = sizeof(struct admin_session);
}