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!
If
.metadata
returns anerr
, then bothfile
andsys_file
will be dropped, closing the handle twice. Use ManuallyDrop to pre-declare the intention to not closesys_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!