It is possible that system file handle/descriptor is opened successfully in
"bool QSerialPortPrivate::open(QIODevice::OpenMode mode)",
but 'false' is returned due to some other error in that function.
In that case opened descriptor is never closed.
For example, if Windows goes back from sleep CreateFile() is successful, but GetCommState() fails for some time. So, the entire application should be restarted to release leaked handle, since the device state is 'closed'.
I did not observe any real failure scenario on other OS's, however the similar leak is also present for example in Unix implementation.
|For Gerrit Dashboard: QTBUG-40414|
|90635,4||Fix leak of a descriptor after unsuccessful opening||5.3||qt/qtserialport||Status: MERGED||+2||0|