Skip to content

Commit

Permalink
add mutex when updating internal-event
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Sep 27, 2024
1 parent d8ab09f commit 724d26d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/tmplexec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ func (e *TemplateExecuter) Execute(ctx *scan.ScanContext) (bool, error) {
ctx.LogError(errx)

if lastMatcherEvent != nil {
lastMatcherEvent.Lock()
lastMatcherEvent.InternalEvent["error"] = getErrorCause(ctx.GenerateErrorMessage())
lastMatcherEvent.Unlock()
writeFailureCallback(lastMatcherEvent, e.options.Options.MatcherStatus)
}

Expand Down

0 comments on commit 724d26d

Please sign in to comment.