[master] 7c738c290 waiter: Dereference wp after checking it

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Sep 6 07:13:05 UTC 2021


commit 7c738c2907836e6504514f298ecc6fe129b9e8b7
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Sep 6 09:11:19 2021 +0200

    waiter: Dereference wp after checking it

diff --git a/bin/varnishd/waiter/cache_waiter_poll.c b/bin/varnishd/waiter/cache_waiter_poll.c
index b3ab4b618..3ff15321e 100644
--- a/bin/varnishd/waiter/cache_waiter_poll.c
+++ b/bin/varnishd/waiter/cache_waiter_poll.c
@@ -97,8 +97,8 @@ static void
 vwp_add(struct vwp *vwp, struct waited *wp)
 {
 
-	VSL(SLT_Debug, wp->fd, "ADD");
 	CHECK_OBJ_NOTNULL(wp, WAITED_MAGIC);
+	VSL(SLT_Debug, wp->fd, "ADD");
 	CHECK_OBJ_NOTNULL(vwp, VWP_MAGIC);
 	if (vwp->hpoll == vwp->npoll)
 		vwp_extend_pollspace(vwp);


More information about the varnish-commit mailing list