Mercurial > hg > freeDiameter-proposed
changeset 1567:745a10fa6e32
fd_psm_start: do not exit function in error case without mutex unlock
Coverity CID 349344
author | Thomas Klausner <wiz@gatalith.at> |
---|---|
date | Tue, 22 Jun 2021 21:40:05 +0200 |
parents | 5643e58cd16d |
children | 7e7d2c5ac70e |
files | libfdcore/p_psm.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }