Revert "vmm: config: Don't close reserved FDs from NetConfig::drop()"

This reverts commit 0110fb4edc.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2023-04-14 15:41:40 -07:00 committed by Bo Chen
parent ec70af1606
commit 3432c0ce5e

View File

@ -1154,11 +1154,6 @@ impl Drop for NetConfig {
fn drop(&mut self) {
if let Some(mut fds) = self.fds.take() {
for fd in fds.drain(..) {
// Skip reserved FDs
if fd <= 2 {
continue;
}
// SAFETY: Safe as the fd was given to the config by the API
unsafe { libc::close(fd) };
}