bytedance / monoio

Rust async runtime based on io-uring.
Apache License 2.0
4.02k stars 226 forks source link

fix potential double close on windows #317

Closed matklad closed 3 weeks ago

matklad commented 3 weeks ago

If .metadata returns an err, then both file and sys_file will be dropped, closing the handle twice. Use ManuallyDrop to pre-declare the intention to not close sys_file.

This is more of a bug report than a pull request. I haven't tested the code, and I don't intend to, feel free to take over this!

CLAassistant commented 3 weeks ago

CLA assistant check
All committers have signed the CLA.