Avoid wasted dup() on each vsock fd.
Bug: 200129208
Test: run compos_verify_key manually & via odsign
Change-Id: I8eb969f8a8ba869a0cdfbb6bd5c034ddbc9bbdcb
diff --git a/compos/common/compos_client.rs b/compos/common/compos_client.rs
index 8030af1..80cf05a 100644
--- a/compos/common/compos_client.rs
+++ b/compos/common/compos_client.rs
@@ -149,8 +149,6 @@
fn try_new_vsock_fd(&self) -> Result<i32> {
let vsock = self.vm.connectVsock(COMPOS_VSOCK_PORT as i32)?;
- // ParcelableFileDescriptor won't release its fd so we have to dup it.
- let vsock = vsock.as_ref().try_clone()?;
// Ownership of the fd is transferred to binder
Ok(vsock.into_raw_fd())
}