diff options
| author | Amar Tumballi <amarts@redhat.com> | 2018-08-18 11:39:03 +0530 | 
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2018-08-19 10:03:52 +0000 | 
| commit | fab6944206bf44e2260f20a9d5f1e785f933e705 (patch) | |
| tree | 0eef23967b99436f0aab400b29a4c703a337d3d1 /libglusterfs/src/mem-pool.c | |
| parent | 23e2a420f90c4d39386a0c0c2a8bea0e376ab070 (diff) | |
coverity: libglusterfs issues
CID: 1391415, 1274122, 1274201, 1382408, 1382437, 1389436
     1288798, 1288106, 1288110
updates: bz#789278
Change-Id: I48c7a50f22f5f4580310040c66463d9f7dd26204
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/mem-pool.c')
| -rw-r--r-- | libglusterfs/src/mem-pool.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index 252bae5d7e3..4b140296b4f 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -825,9 +825,9 @@ mem_get (struct mem_pool *mem_pool)          (void) pthread_spin_lock (&pool_list->lock);          pt_pool = &pool_list->pools[mem_pool->pool->power_of_two-POOL_SMALLEST];          retval = mem_get_from_pool (pt_pool); -        (void) pthread_spin_unlock (&pool_list->lock);          if (!retval) { +                (void) pthread_spin_unlock (&pool_list->lock);                  return NULL;          } @@ -835,6 +835,7 @@ mem_get (struct mem_pool *mem_pool)          retval->pool = mem_pool;          retval->pool_list = pool_list;          retval->power_of_two = mem_pool->pool->power_of_two; +        (void) pthread_spin_unlock (&pool_list->lock);          GF_ATOMIC_INC (mem_pool->active);  | 
