diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-07 12:58:20 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-07 12:58:20 +0900 |
| commit | 568d7758d5308457967672997d9d2e786c7403f1 (patch) | |
| tree | 93386d3ecc86309a462c19a95956d64aac0800a6 | |
| parent | 5b7b3fa9a4d8ca4ad08d6648752e28ee66f0ffae (diff) | |
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>
| -rw-r--r-- | helper/seccomp/export.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helper/seccomp/export.go b/helper/seccomp/export.go index 4ac620bc..6706408f 100644 --- a/helper/seccomp/export.go +++ b/helper/seccomp/export.go @@ -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) |
