Skip to content

Commit 689b342

Browse files
henry118fuweid
authored andcommitted
cri: close fifos when container is deleted
Signed-off-by: Henry Wang <[email protected]> (cherry picked from commit 8710d4d) Signed-off-by: Wei Fu <[email protected]>
1 parent 50e234c commit 689b342

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
@@ -175,7 +175,11 @@ func (s *Store) Delete(id string) {
175175
// So we need to return if there are error.
176176
return
177177
}
178-
s.labels.Release(s.containers[id].ProcessLabel)
178+
c := s.containers[id]
179+
if c.IO != nil {
180+
c.IO.Close()
181+
}
182+
s.labels.Release(c.ProcessLabel)
179183
s.idIndex.Delete(id) // nolint: errcheck
180184
delete(s.containers, id)
181185
}

0 commit comments

Comments
 (0)