[4.1] 8f7313e init the condvar before we signal it
Lasse Karstensen
lkarsten at varnish-software.com
Thu Jan 14 15:15:04 CET 2016
commit 8f7313e5a433e87c1bef8893581a65deef15a6f2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Nov 11 10:36:06 2015 +0000
init the condvar before we signal it
diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index 3042653..565b5d1 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -761,8 +761,8 @@ BAN_Init(void)
/* Add a placeholder ban */
bp = BAN_Build();
AN(bp);
- AZ(BAN_Commit(bp));
AZ(pthread_cond_init(&ban_lurker_cond, NULL));
+ AZ(BAN_Commit(bp));
Lck_Lock(&ban_mtx);
ban_mark_completed(VTAILQ_FIRST(&ban_head));
Lck_Unlock(&ban_mtx);
More information about the varnish-commit
mailing list