test_server.c allocate user date in server_accept callback, but free it in conn_close_notify callback, which may cause memory leak if a connection is closed before it get ALPN.
This can be fixed by implementing the server_refuse callback, which is designed to work with server_accept in such scenarios.
Steps To Reproduce
Run it with valgrind in a high loss rate environment.
What happened?
test_server.c allocate user date in
server_accept
callback, but free it inconn_close_notify
callback, which may cause memory leak if a connection is closed before it get ALPN. This can be fixed by implementing theserver_refuse
callback, which is designed to work withserver_accept
in such scenarios.Steps To Reproduce
Run it with valgrind in a high loss rate environment.
Relevant log output
No response