Skip to content

Commit 18d7e84

Browse files
committed
runtime/shim: fix the nil checkpoint options
Signed-off-by: Iceber Gu <[email protected]>
1 parent c5a43b0 commit 18d7e84

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

runtime/v2/runc/container.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,12 @@ func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskReques
470470
if err != nil {
471471
return err
472472
}
473-
var opts *options.CheckpointOptions
473+
474+
var opts options.CheckpointOptions
474475
if r.Options != nil {
475-
v, err := typeurl.UnmarshalAny(r.Options)
476-
if err != nil {
476+
if err := typeurl.UnmarshalTo(r.Options, &opts); err != nil {
477477
return err
478478
}
479-
opts = v.(*options.CheckpointOptions)
480479
}
481480
return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{
482481
Path: r.Path,

0 commit comments

Comments
 (0)