diff options
author | Dave Barach <dave@barachs.net> | 2016-06-16 20:14:43 -0400 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-06-17 07:09:44 +0000 |
commit | b84ccc614d2032b5ddee9ab145d82d2eb70723e8 (patch) | |
tree | 37d4bc534c67027aa4e65a02d1444130282307ab /vlib-api | |
parent | 45050f8781a4ceb8b99068c75604b81a32b9cf84 (diff) |
vpp-83: fix double-unlock
Change-Id: I0b75b4f9bef62aba69e9cc163924f6b985a35455
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib-api')
-rw-r--r-- | vlib-api/vlibmemory/memory_shared.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vlib-api/vlibmemory/memory_shared.c b/vlib-api/vlibmemory/memory_shared.c index 1684acfd..e4f5dd0d 100644 --- a/vlib-api/vlibmemory/memory_shared.c +++ b/vlib-api/vlibmemory/memory_shared.c @@ -288,8 +288,9 @@ int vl_map_shmem (char *region_name, int is_vlib) pthread_mutex_lock (&root_rp->mutex); svm_client_scan_this_region_nolock (root_rp); pthread_mutex_unlock (&root_rp->mutex); - } - pthread_mutex_unlock (&vlib_rp->mutex); + } else { + pthread_mutex_unlock (&vlib_rp->mutex); + } am->vlib_rp = vlib_rp; vec_add1(am->mapped_shmem_regions, vlib_rp); return 0; |