diff options
author | 2017-03-09 21:10:45 +0100 | |
---|---|---|
committer | 2017-03-17 20:36:55 +0000 | |
commit | ad0697a134926c8d9cff8ae2747c4c554811c9db (patch) | |
tree | cfd8d97309f3df9e2251c9febf883dd89d49464e /src/vpp-api/pneum | |
parent | ed812458641e8805e98a5bb399248745bae5d6b7 (diff) |
PNEUM: Fix Coverity error (missing unlock).
Change-Id: I53433e89d06fbc95e160887517acafc1544e81b5
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/pneum')
-rw-r--r-- | src/vpp-api/pneum/pneum.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vpp-api/pneum/pneum.c b/src/vpp-api/pneum/pneum.c index cbae5cff..8b34d3e4 100644 --- a/src/vpp-api/pneum/pneum.c +++ b/src/vpp-api/pneum/pneum.c @@ -235,9 +235,10 @@ pneum_rx_resume (void) pneum_main_t *pm = &pneum_main; if (!pm->rx_thread_handle) return; pthread_mutex_lock(&pm->queue_lock); - if (rx_is_running) return; + if (rx_is_running) goto unlock; pthread_cond_signal(&pm->resume_cv); rx_is_running = true; + unlock: pthread_mutex_unlock(&pm->queue_lock); } |