aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome/shim.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-29 23:10:12 +0900
committerOphestra <cat@gensokyo.uk>2025-10-29 23:10:12 +0900
commit2563391086b81cc1f68b76fe8e6ce18b9554ff2c (patch)
tree4ea03eccb7893025e64aac23699ba879a3f2e655 /internal/outcome/shim.go
parenta0b4e47acc228e48165966d8e139277b8f6f450e (diff)
internal/outcome/shim: params check early
This is unreachable, but keeping it here as a failsafe until more test cases are added. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/shim.go')
-rw-r--r--internal/outcome/shim.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/outcome/shim.go b/internal/outcome/shim.go
index 53d04ea2..b07770b4 100644
--- a/internal/outcome/shim.go
+++ b/internal/outcome/shim.go
@@ -147,6 +147,9 @@ func shimEntrypoint(k syscallDispatcher) {
}
}
}
+ if stateParams.params.Ops == nil { // unreachable
+ k.fatal("invalid container params")
+ }
// shim exit outcomes
var cancelContainer atomic.Pointer[context.CancelFunc]
@@ -187,10 +190,6 @@ func shimEntrypoint(k syscallDispatcher) {
}
})
- if stateParams.params.Ops == nil {
- k.fatal("invalid container params")
- }
-
// close setup socket
if err := closeSetup(); err != nil {
msg.Verbosef("cannot close setup pipe: %v", err)