Fix leak of a descriptor after unsuccessful opening
authorDenis Shienkov <denis.shienkov@gmail.com>
Fri, 25 Jul 2014 08:14:54 +0000 (12:14 +0400)
committerDenis Shienkov <denis.shienkov@gmail.com>
Thu, 31 Jul 2014 17:28:05 +0000 (19:28 +0200)
commit5002109313f914674d20a2fac1c38ce5360fb67d
tree6b0ee54d68ba7eb01921890d12ce646a5c0c45f9
parent26504a5fe1c13af3b84b60eb2a5eb754c80d3c22
Fix leak of a descriptor after unsuccessful opening

In case of unsuccessful initialization of a device at the opening, a
valid descriptor has to be closed before return from the open() method.

Task-number: QTBUG-40414
Change-Id: I45568f176e003d9be1fe8c3017da29f39908efb0
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
src/serialport/qserialport_unix.cpp
src/serialport/qserialport_unix_p.h
src/serialport/qserialport_win.cpp
src/serialport/qserialport_win_p.h
src/serialport/qserialport_wince.cpp
src/serialport/qserialport_wince_p.h