Ver Fonte

no leak plz

bui há 1 ano atrás
pai
commit
82bb8a2789
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      pkg/acquisition/modules/waap/waap_runner.go

+ 2 - 0
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
 }