diff --git a/xray/audit/jas/jasmanager.go b/xray/audit/jas/jasmanager.go index 1b4ed0ff9..e8251633a 100644 --- a/xray/audit/jas/jasmanager.go +++ b/xray/audit/jas/jasmanager.go @@ -79,9 +79,7 @@ func GetExtendedScanResults(xrayResults []services.ScanResponse, dependencyTrees } defer func() { cleanup := scanner.scannerDirCleanupFunc - if cleanup != nil { - err = errors.Join(err, cleanup()) - } + err = errors.Join(err, cleanup()) }() applicabilityScanResults, err := getApplicabilityScanResults( xrayResults, dependencyTrees, scannedTechnologies, scanner)