Skip to content

Commit 5899a01

Browse files
committed
Fix segv when removing the last socket entry.
Signed-off-by: Ville Aikas <[email protected]>
1 parent a508151 commit 5899a01

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ static void state_remove_socket_fd(struct state *state, int socket_fd) {
119119
for (conn = state->conns; conn->next != NULL; conn = conn->next) {
120120
if (conn->next->socket_fd == socket_fd) {
121121
conn->next = conn->next->next;
122+
break;
122123
}
123124
}
124125
}

0 commit comments

Comments
 (0)