summaryrefslogtreecommitdiff
path: root/nscd/mem.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-07-17 07:49:16 -0700
committerUlrich Drepper <drepper@redhat.com>2009-07-17 07:49:16 -0700
commit00ebd7ed58df389a78e41dece058048725cb585e (patch)
tree63c38fcd06fb04e19d3072e66ca97647c16a1aed /nscd/mem.c
parent09f97a8fbf8be28cc489a7baa1bead17e2cbf764 (diff)
Revert "Fix lock handling in memory hander of nscd."
This reverts commit 137028b4d7e50f71906c1656c27079eac5a1d085. Conflicts: ChangeLog
Diffstat (limited to 'nscd/mem.c')
-rw-r--r--nscd/mem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nscd/mem.c b/nscd/mem.c
index 80ea951146..fcea6dbd03 100644
--- a/nscd/mem.c
+++ b/nscd/mem.c
@@ -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;
}