Merge pull request #6842 from henry118/fifo

cri: close fifos when container is deleted
This commit is contained in:
Phil Estes 2022-04-22 16:28:32 +01:00 committed by GitHub
commit 6111b5ea8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,11 @@ func (s *Store) Delete(id string) {
// So we need to return if there are error.
return
}
s.labels.Release(s.containers[id].ProcessLabel)
c := s.containers[id]
if c.IO != nil {
c.IO.Close()
}
s.labels.Release(c.ProcessLabel)
s.idIndex.Delete(id) // nolint: errcheck
delete(s.containers, id)
}