diff options
author | Slávek Banko <[email protected]> | 2016-09-29 02:31:41 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-09-29 02:31:41 +0200 |
commit | 105df0826eca906593e73a0a6333e3c867067ed2 (patch) | |
tree | 14555fd4593316263354e75d93106fc8f1d3f95c | |
parent | dcf83fa05df5be638bd93b7b13e2ad7d1335ec65 (diff) | |
download | tdepim-105df0826eca906593e73a0a6333e3c867067ed2.tar.gz tdepim-105df0826eca906593e73a0a6333e3c867067ed2.zip |
Fix missing return in KMobileDevice::unlockDevice
This resolves bug 2692
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | kmobile/kmobiledevice.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp index abf750579..723946477 100644 --- a/kmobile/kmobiledevice.cpp +++ b/kmobile/kmobiledevice.cpp @@ -382,12 +382,14 @@ bool KMobileDevice::unlockDevice(const TQString &device) #ifdef HAVE_BAUDBOY_H return ttyunlock(device.local8bit()) == EXIT_SUCCESS; #else - if (m_fd != -1) - { - flock(m_fd, LOCK_UN); + if (m_fd != -1) { + if(flock(m_fd, LOCK_UN)) { + return false; } - close(m_fd); + close(m_fd); + } m_fd = -1; + return true; #endif } |