Skip to content

Commit

Permalink
libcontainer/specconv/spec_linux: Avoid panic when Linux is unset
Browse files Browse the repository at this point in the history
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 <wking@tremily.us>
wking committed Feb 20, 2018
1 parent e32d0d9 commit ed4b83c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcontainer/specconv/spec_linux.go
Original file line number Diff line number Diff line change
@@ -257,7 +257,7 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
}
createHooks(spec, config)
config.Version = specs.Version
if spec.Linux.IntelRdt != nil {
if spec.Linux != nil && spec.Linux.IntelRdt != nil {
config.IntelRdt = &configs.IntelRdt{}
if spec.Linux.IntelRdt.L3CacheSchema != "" {
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema

0 comments on commit ed4b83c

Please sign in to comment.