Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: test_server.c may cause memory leak #263

Closed
Luffbee opened this issue Nov 12, 2022 · 0 comments · Fixed by #383
Closed

[Bug]: test_server.c may cause memory leak #263

Luffbee opened this issue Nov 12, 2022 · 0 comments · Fixed by #383

Comments

@Luffbee
Copy link

Luffbee commented Nov 12, 2022

What happened?

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.

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants