[master] af24f081c Fix an insignificant race found by Coverity
Poul-Henning Kamp
phk at FreeBSD.org
Wed Dec 6 10:12:08 UTC 2023
commit af24f081cecb98e5afe6a34f4ff5d65ce55d4542
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Dec 6 09:31:37 2023 +0000
Fix an insignificant race found by Coverity
diff --git a/vmod/vmod_directors_fall_back.c b/vmod/vmod_directors_fall_back.c
index b24e25e8e..a5cc37057 100644
--- a/vmod/vmod_directors_fall_back.c
+++ b/vmod/vmod_directors_fall_back.c
@@ -169,9 +169,9 @@ vmod_fallback_resolve(VRT_CTX, VCL_BACKEND dir)
if (++fb->cur == fb->vd->n_backend)
fb->cur = 0;
}
- vdir_unlock(fb->vd);
if (u == fb->vd->n_backend)
be = NULL;
+ vdir_unlock(fb->vd);
return (be);
}
More information about the varnish-commit
mailing list