cri: close fifos when container is deleted

Signed-off-by: Henry Wang <henwang@amazon.com>
This commit is contained in:
Henry Wang 2022-04-21 21:34:04 +00:00
parent 0c2b6a102a
commit 8710d4d014

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)
}