Skip to content

Commit 4de643b

Browse files
committed
Close Device after reading serial
1 parent 37c2728 commit 4de643b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ impl Yubico {
7979
let mut response = [0; 36];
8080
manager::read_response(&mut handle.0, &mut response)?;
8181

82+
drop(handle); // Close Device
83+
8284
// Check response.
8385
if crc16(&response[..6]) != crate::sec::CRC_RESIDUAL_OK {
8486
return Err(YubicoError::WrongCRC);

0 commit comments

Comments
 (0)