helper/seccomp: panic on invalid closeWrite use
Returning an error here puts exporter in an invalid state. The caller should guard against this condition instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
5b7b3fa9a4
commit
568d7758d5
@ -40,7 +40,7 @@ func (e *exporter) closeWrite() error {
|
||||
return *e.closeErr.Load()
|
||||
}
|
||||
if e.w == nil {
|
||||
return fs.ErrInvalid
|
||||
panic("closeWrite called on invalid exporter")
|
||||
}
|
||||
err := e.w.Close()
|
||||
e.closeErr.Store(&err)
|
||||
|
Loading…
Reference in New Issue
Block a user