aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2017-03-09 21:10:45 +0100
committerDave Barach <openvpp@barachs.net>2017-03-17 20:36:55 +0000
commitad0697a134926c8d9cff8ae2747c4c554811c9db (patch)
treecfd8d97309f3df9e2251c9febf883dd89d49464e /src
parented812458641e8805e98a5bb399248745bae5d6b7 (diff)
PNEUM: Fix Coverity error (missing unlock).
Change-Id: I53433e89d06fbc95e160887517acafc1544e81b5 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vpp-api/pneum/pneum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vpp-api/pneum/pneum.c b/src/vpp-api/pneum/pneum.c
index cbae5cff578..8b34d3e4801 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);
}