]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: filters/lua: Release filters before the lua context
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 24 Feb 2020 15:26:55 +0000 (16:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 12 Aug 2021 06:57:07 +0000 (08:57 +0200)
This patch is mandatory to allow the support of the filters written in lua.

src/stream.c

index 54f5b924e4b53fd291787717178bae5cd68f5c82..132ee3abd5503bd1a9aa0115ec79dc016d87212b 100644 (file)
@@ -655,6 +655,9 @@ static void stream_free(struct stream *s)
        pool_free(pool_head_uniqueid, s->unique_id.ptr);
        s->unique_id = IST_NULL;
 
+       flt_stream_stop(s);
+       flt_stream_release(s, 0);
+
        hlua_ctx_destroy(s->hlua);
        s->hlua = NULL;
        if (s->txn)
@@ -684,9 +687,6 @@ static void stream_free(struct stream *s)
                s->resolv_ctx.requester = NULL;
        }
 
-       flt_stream_stop(s);
-       flt_stream_release(s, 0);
-
        if (fe) {
                if (s->req_cap) {
                        struct cap_hdr *h;