From 6c6d12ace7b21ec23214a5d7e121ab71b65b21b5 Mon Sep 17 00:00:00 2001 From: Bradley Jones Date: Wed, 10 Apr 2024 14:02:14 +0100 Subject: [PATCH] fix: missing lock reading results map Signed-off-by: Bradley Jones --- pkg/adapter/anchore/result_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/adapter/anchore/result_store.go b/pkg/adapter/anchore/result_store.go index 1a2bf84..915981e 100644 --- a/pkg/adapter/anchore/result_store.go +++ b/pkg/adapter/anchore/result_store.go @@ -172,7 +172,7 @@ func (m *MemoryResultStore) RequestAnalysisStatus( // Result not found so begin the async fetch go func() { complete, err := buildFn() - currentState := m.Results[scanID] + currentState, _ := m.GetResult(scanID) if err != nil { log.Debugf("error checking analysis state for %v: %v", scanID, err) // Set IsComplete to true to remove the scan from the store if the create scan fails so that it can be retried without using the cache.