cri: introspectRuntimeFeatures: fix nil panic
Fix issue 10062 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
01ed3ff123
commit
c27bcdc564
@ -409,9 +409,11 @@ func introspectRuntimeFeatures(ctx context.Context, intro introspection.Service,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
rr.Options, err = protobuf.MarshalAnyToProto(options)
|
if options != nil {
|
||||||
if err != nil {
|
rr.Options, err = protobuf.MarshalAnyToProto(options)
|
||||||
return nil, fmt.Errorf("failed to marshal %T: %w", options, err)
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to marshal %T: %w", options, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
infoResp, err := intro.PluginInfo(ctx, string(plugins.RuntimePluginV2), "task", rr)
|
infoResp, err := intro.PluginInfo(ctx, string(plugins.RuntimePluginV2), "task", rr)
|
||||||
|
Loading…
Reference in New Issue
Block a user