41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
From fffe7583af018e9a9424139d9fc4080586cf3f90 Mon Sep 17 00:00:00 2001
|
|
From: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
|
|
Date: Sat, 23 Jan 2021 08:52:26 +0100
|
|
Subject: [PATCH] Move away from VRT_re_fini
|
|
|
|
It will be gone in the next Varnish release.
|
|
---
|
|
src/vmod_querystring.c | 13 ++++++++++++-
|
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/vmod_querystring.c b/src/vmod_querystring.c
|
|
index f5ef7f0..b156643 100644
|
|
--- a/src/vmod_querystring.c
|
|
+++ b/src/vmod_querystring.c
|
|
@@ -208,6 +208,17 @@ qs_match_regex(VRT_CTX, const struct qs_filter *qsf, const char *s,
|
|
return (VRT_re_match(ctx, s, qsf->ptr));
|
|
}
|
|
|
|
+static void
|
|
+qs_free_regex(void *priv)
|
|
+{
|
|
+ vre_t *re;
|
|
+
|
|
+ AN(priv);
|
|
+ re = priv;
|
|
+ VRE_free(&re);
|
|
+ AZ(re);
|
|
+}
|
|
+
|
|
static int
|
|
qs_match_glob(VRT_CTX, const struct qs_filter *qsf, const char *s,
|
|
unsigned keep)
|
|
@@ -595,7 +606,7 @@ vmod_filter_add_regex(VRT_CTX, struct VPFX(querystring_filter) *obj,
|
|
}
|
|
|
|
qsf->match = qs_match_regex;
|
|
- qsf->free = VRT_re_fini;
|
|
+ qsf->free = qs_free_regex;
|
|
VTAILQ_INSERT_TAIL(&obj->filters, qsf, list);
|
|
}
|
|
|