Avoid concurrent Map writes

This commit is contained in:
Kota Kanbe
2017-05-18 15:50:25 +09:00
committed by kota kanbe
parent 8b6c841b1e
commit 7f8c975bd7
3 changed files with 48 additions and 57 deletions

View File

@@ -326,7 +326,6 @@ func (o *redhat) scanUnsecurePackagesUsingYumCheckUpdate() (models.VulnInfos, er
o.log.Debugf("%s", pp.Sprintf("%v", packages))
// set candidate version info
//TODO Mutex??
o.Packages.MergeNewVersion(packages)
// Collect CVE-IDs in changelog
@@ -356,7 +355,6 @@ func (o *redhat) scanUnsecurePackagesUsingYumCheckUpdate() (models.VulnInfos, er
Contents: *clog,
Method: models.ChangelogExactMatchStr,
}
//TODO Mutex
o.Packages[p.Name] = p
break
}
@@ -736,7 +734,6 @@ func (o *redhat) scanUnsecurePackagesUsingYumPluginSecurity() (models.VulnInfos,
if err != nil {
return nil, err
}
// pp.Println(advisoryCveIDsList)
// All information collected.
// Convert to VulnInfos.