Skip to content

Commit 53a77e5

Browse files
committed
update.go: fix nil pointer risk in Intel RDT initialization
1 parent cdf9530 commit 53a77e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

update.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ other options are ignored.
363363
}
364364
config.IntelRdt = &configs.IntelRdt{}
365365
intelRdtManager := intelrdt.NewManager(&config, container.ID(), state.IntelRdtPath)
366+
if intelRdtManager == nil {
367+
return fmt.Errorf("failed to create IntelRdtManager (got nil)")
368+
}
366369
if err := intelRdtManager.Apply(state.InitProcessPid); err != nil {
367370
return err
368371
}

0 commit comments

Comments
 (0)