mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +08:00
CloseHanle fd_ if SetCommState fails in function Serial::SerialImpl::reconfigurePort ().
This commit is contained in:
parent
7de61c1603
commit
7bce3e0fdc
@ -242,6 +242,7 @@ Serial::SerialImpl::reconfigurePort ()
|
|||||||
|
|
||||||
// activate settings
|
// activate settings
|
||||||
if (!SetCommState(fd_, &dcbSerialParams)){
|
if (!SetCommState(fd_, &dcbSerialParams)){
|
||||||
|
CloseHandle(fd_);
|
||||||
THROW (IOException, "Error setting serial port settings.");
|
THROW (IOException, "Error setting serial port settings.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user