Skip to content

Commit ed4b83c

Browse files
committed
libcontainer/specconv/spec_linux: Avoid panic when Linux is unset
As it can be since at least opencontainers/runtime-spec@b373a155 (config: Split platform-specific configuration into its own section, 2016-05-02, opencontainers/runtime-spec#414). Signed-off-by: W. Trevor King <[email protected]>
1 parent e32d0d9 commit ed4b83c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/specconv/spec_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
257257
}
258258
createHooks(spec, config)
259259
config.Version = specs.Version
260-
if spec.Linux.IntelRdt != nil {
260+
if spec.Linux != nil && spec.Linux.IntelRdt != nil {
261261
config.IntelRdt = &configs.IntelRdt{}
262262
if spec.Linux.IntelRdt.L3CacheSchema != "" {
263263
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema

0 commit comments

Comments
 (0)