From 5aea9288fa4ab2c1fee38f6226f214e11e5a9984 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 6 Mar 1996 23:09:51 +0000 Subject: (_pager_lock_object): Correctly remove LR from P's linked list of lock requests. --- libpager/lock-object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libpager/lock-object.c b/libpager/lock-object.c index d4740ee3..4d0ce7c5 100644 --- a/libpager/lock-object.c +++ b/libpager/lock-object.c @@ -79,9 +79,11 @@ _pager_lock_object (struct pager *p, while (lr->locks_pending || lr->pending_writes) condition_wait (&p->wakeup, &p->interlock); - if (!--lr->threads_waiting) + if (! --lr->threads_waiting) { *lr->prevp = lr->next; + if (lr->next) + lr->next->prevp = lr->prevp; free (lr); } } -- cgit v1.2.3