mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
prevent a memory leak when multiple fds are received in short time
This commit is contained in:
@@ -142,9 +142,10 @@ int handle_worker_commands(struct worker_st *ws)
|
||||
ws->udp_state = UP_SETUP;
|
||||
}
|
||||
|
||||
if (ws->dtls_tptr.fd != -1) {
|
||||
if (ws->dtls_tptr.fd != -1)
|
||||
close(ws->dtls_tptr.fd);
|
||||
}
|
||||
if (ws->dtls_tptr.msg != NULL)
|
||||
udp_fd_msg__free_unpacked(tmsg, NULL);
|
||||
|
||||
ws->dtls_tptr.msg = tmsg;
|
||||
ws->dtls_tptr.consumed = 0;
|
||||
|
||||
Reference in New Issue
Block a user