[6.0] 78c9b146e fix missing initialization
Reza Naghibi
reza at naghibi.com
Wed Apr 21 14:29:05 UTC 2021
commit 78c9b146e663a32140a2d40da2e6f7c4858d1c24
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sat Jan 18 14:19:10 2020 +0100
fix missing initialization
... introduced with 3bb8b84cd86a4d2b95c7e2508ace6d868ced412c:
in Pool_Work_Thread(), we could break out of the for (i = 0; i <
TASK_QUEUE__END; i++) loop with tp set to the value from the previous
iteration of the top while() loop where if should have been NULL (for no
task found).
Noticed staring at #3192 - unclear yet if related
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index e148cdca2..2083e4cf7 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -333,7 +333,7 @@ pool_kiss_of_death(struct worker *wrk, void *priv)
static void
Pool_Work_Thread(struct pool *pp, struct worker *wrk)
{
- struct pool_task *tp = NULL;
+ struct pool_task *tp;
struct pool_task tpx, tps;
vtim_real tmo;
int i, reserve;
@@ -342,6 +342,7 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk)
wrk->pool = pp;
while (1) {
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
+ tp = NULL;
WS_Reset(wrk->aws, 0);
AZ(wrk->vsl);
More information about the varnish-commit
mailing list