[master] c7104e3e1 Revert "Fix a newly introduced lifetime violation"
Nils Goroll
nils.goroll at uplex.de
Wed Feb 23 10:14:08 UTC 2022
commit c7104e3e11889b7fb27af5daa7c2adfb27430d4d
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Feb 23 10:37:54 2022 +0100
Revert "Fix a newly introduced lifetime violation"
The fix did work, but the explanation was wrong.
This reverts commit a6c1306494bab1d95fc7dd571089b80336922a1c.
diff --git a/vmod/vmod_vtc.c b/vmod/vmod_vtc.c
index 06bab4bcd..143e5e7ce 100644
--- a/vmod/vmod_vtc.c
+++ b/vmod/vmod_vtc.c
@@ -443,6 +443,7 @@ vsl_line(VRT_CTX, char *str)
{
VCL_INT id;
VCL_ENUM side;
+ VCL_STRANDS s;
const char *tag, *delim = " \t\r\n";
char *e, *save;
@@ -474,9 +475,11 @@ vsl_line(VRT_CTX, char *str)
str = strtok_r(NULL, "\r\n", &save);
if (str == NULL)
- vmod_vsl(ctx, id, tag, side, vrt_null_strands);
+ s = vrt_null_strands;
else
- vmod_vsl(ctx, id, tag, side, TOSTRAND(str));
+ s = TOSTRAND(str);
+
+ vmod_vsl(ctx, id, tag, side, s);
}
VCL_VOID
More information about the varnish-commit
mailing list