Skip to content

Commit

Permalink
ipc: bug fix in listen() allocating connection backlog
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 9, 2024
1 parent 07c0421 commit a2fbef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipc/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int listen(Thread *t, int sd, int backlog) {
if(backlog > 0) sock->backlogMax = backlog;
else sock->backlogMax = SOCKET_DEFAULT_BACKLOG;

sock->backlog = calloc(backlog, sizeof(SocketDescriptor *));
sock->backlog = calloc(sock->backlogMax, sizeof(SocketDescriptor *));
if(!sock->backlog) {
socketRelease();
return -ENOBUFS;
Expand Down

0 comments on commit a2fbef2

Please sign in to comment.