no leak plz

This commit is contained in:
bui 2023-10-26 13:01:11 +02:00
parent f18b554177
commit 82bb8a2789

View file

@ -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
}