fix: entries not cleared on resolve (#13705)

This can cause old entries to be included (albeit unlikely) in resolution.
This commit is contained in:
Klaus Post 2021-11-20 02:02:57 -08:00 committed by GitHub
parent 3da9ee15d3
commit 1cddbc80cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ func (m metaCacheEntries) resolve(r *metadataResolutionParams) (selected *metaCa
e *metaCacheEntry
}, 0, len(m))
}
r.candidates = r.candidates[0:]
r.candidates = r.candidates[:0]
for i := range m {
entry := &m[i]
if entry.name == "" {