alibaba / xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Apache License 2.0
1.65k stars 326 forks source link

[Bug]: memory leak if connection closed during handshake #197

Closed Luffbee closed 1 year ago

Luffbee commented 2 years ago

What happened?

https://github.com/alibaba/xquic/blob/8fab2f91a468dc9f37ba02cca14d032ca8f40353/src/transport/xqc_conn.h#L310-L313

These 3 lists are not cleared when connection destroy, so if the connection is closed during handshake (e.g. caused by a timeout), the xqc_hs_buffer_ts in these lists will leak.

Steps To Reproduce

I found this bug in a customized version, so I'm not sure this can be reproduced.

Relevant log output

No response

Kulsk commented 1 year ago

fixed on #287