src/base/sysf_tmr.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Add missing decrementing reference counter 'gl_tcb.persist' in ncs_tmr_start() and ncs_tmr_remaining() diff --git a/src/base/sysf_tmr.c b/src/base/sysf_tmr.c --- a/src/base/sysf_tmr.c +++ b/src/base/sysf_tmr.c @@ -720,6 +720,7 @@ tmr_t ncs_tmr_start(tmr_t tid, int64_t t if (rc == NCSCC_RC_FAILURE) { /* Free the timer created */ m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE); + ncslpg_give(&gl_tcb.persist, 0); return NULL; } #if ENABLE_SYSLOG_TMR_STATS @@ -735,6 +736,7 @@ tmr_t ncs_tmr_start(tmr_t tid, int64_t t /* We would never reach here! */ m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE); m_LEAP_DBG_SINK_VOID; + ncslpg_give(&gl_tcb.persist, 0); return NULL; } } @@ -904,6 +906,7 @@ int64_t ncs_tmr_remaining(tmr_t tmrID, i m_NCS_LOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE); /* critical region START */ if (!TMR_TEST_STATE(tmr, TMR_STATE_START)) { m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE); /* critical region START */ + ncslpg_give(&gl_tcb.persist, 0); return NCSCC_RC_FAILURE; } m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE); /* critical region START */ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel