# HG changeset patch # User Thomas Klausner # Date 1624390805 -7200 # Node ID 745a10fa6e32e136be42bd17fba28a9a9a716274 # Parent 5643e58cd16d01e4f1953c27e66d3f8a83c8aa9f fd_psm_start: do not exit function in error case without mutex unlock Coverity CID 349344 diff -r 5643e58cd16d -r 745a10fa6e32 libfdcore/p_psm.c --- a/libfdcore/p_psm.c Tue Jun 22 21:34:30 2021 +0200 +++ b/libfdcore/p_psm.c Tue Jun 22 21:40:05 2021 +0200 @@ -141,12 +141,13 @@ /* Allow the state machines to start */ int fd_psm_start() { + int ret = 0; TRACE_ENTRY(""); CHECK_POSIX( pthread_mutex_lock(&started_mtx) ); started = 1; - CHECK_POSIX( pthread_cond_broadcast(&started_cnd) ); + ret = pthread_cond_broadcast(&started_cnd); CHECK_POSIX( pthread_mutex_unlock(&started_mtx) ); - return 0; + return ret; }