diff options
Diffstat (limited to 'nscd/mem.c')
-rw-r--r-- | nscd/mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -566,6 +566,9 @@ mempool_alloc (struct database_dyn *db, size_t len, int data_alloc) } } + if (data_alloc) + pthread_rwlock_unlock (&db->lock); + if (! db->last_alloc_failed) { dbg_log (_("no more memory for database '%s'"), dbnames[db - dbs]); @@ -588,8 +591,5 @@ mempool_alloc (struct database_dyn *db, size_t len, int data_alloc) pthread_mutex_unlock (&db->memlock); - if (data_alloc) - pthread_rwlock_unlock (&db->lock); - return res; } |