Skip to content
Snippets Groups Projects
Commit e3331b08 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Return an error if calloc() fails allocating pollfd array.

parent e6e83a5d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1614 passed
......@@ -362,6 +362,8 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
if(FD_ISSET(xpms_set->socks[i].sock, &read_fs)) {
#else
fds = calloc(xpms_set->sock_count, sizeof(*fds));
if (fds == NULL)
return INVALID_SOCKET;
for (i = 0; i < xpms_set->sock_count; i++) {
if (xpms_set->socks[i].sock == INVALID_SOCKET)
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment