[master] f0b60c0 init the condvar before we signal it

Poul-Henning Kamp phk at FreeBSD.org
Wed Nov 11 11:36:18 CET 2015


commit f0b60c06b2de78b9833528d639445ca074990e88
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