Skip to content

Commit 8710d4d

Browse files
committed
cri: close fifos when container is deleted
Signed-off-by: Henry Wang <[email protected]>
1 parent 0c2b6a1 commit 8710d4d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/cri/store/container/container.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ func (s *Store) Delete(id string) {
200200
// So we need to return if there are error.
201201
return
202202
}
203-
s.labels.Release(s.containers[id].ProcessLabel)
203+
c := s.containers[id]
204+
if c.IO != nil {
205+
c.IO.Close()
206+
}
207+
s.labels.Release(c.ProcessLabel)
204208
s.idIndex.Delete(id) // nolint: errcheck
205209
delete(s.containers, id)
206210
}

0 commit comments

Comments
 (0)