Skip to content

Commit

Permalink
Merge pull request #6857 from fuweid/cp-15-6842
Browse files Browse the repository at this point in the history
[release/1.5] cri: close fifos when container is deleted
  • Loading branch information
kzys committed Apr 26, 2022
2 parents 50e234c + 689b342 commit 3ae6984
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cri/store/container/container.go
Expand Up @@ -175,7 +175,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)
}

0 comments on commit 3ae6984

Please sign in to comment.