From 82bb8a2789b64b5f83ea37a5bd389275c1419696 Mon Sep 17 00:00:00 2001 From: bui Date: Thu, 26 Oct 2023 13:01:11 +0200 Subject: [PATCH] no leak plz --- pkg/acquisition/modules/waap/waap_runner.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/acquisition/modules/waap/waap_runner.go b/pkg/acquisition/modules/waap/waap_runner.go index 53bfbfc38..85b45220f 100644 --- a/pkg/acquisition/modules/waap/waap_runner.go +++ b/pkg/acquisition/modules/waap/waap_runner.go @@ -55,6 +55,7 @@ func (r *WaapRunner) Init(datadir string) error { if !tx.IsRequestBodyAccessible() { runnerLogger.Warningf("request body is not accessible, inband rules won't be able to match on it") } + tx.Close() r.WaapOutbandEngine, err = coraza.NewWAF( coraza.NewWAFConfig().WithDirectives(outOfBandRules).WithRootFS(fs).WithDebugLogger(NewCrzLogger(runnerLogger)), @@ -68,6 +69,7 @@ func (r *WaapRunner) Init(datadir string) error { if !tx.IsRequestBodyAccessible() { runnerLogger.Warningf("request body is not accessible, outband rules won't be able to match on it") } + tx.Close() return nil }