mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Merge pull request #2656 from giuseppe/fix-rootfs-segfault
container: check containerInfo.Config before accessing it
This commit is contained in:
@ -337,11 +337,13 @@ func (c *Container) setupStorage(ctx context.Context) error {
|
||||
}
|
||||
|
||||
// Set the default Entrypoint and Command
|
||||
if c.config.Entrypoint == nil {
|
||||
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
|
||||
}
|
||||
if c.config.Command == nil {
|
||||
c.config.Command = containerInfo.Config.Config.Cmd
|
||||
if containerInfo.Config != nil {
|
||||
if c.config.Entrypoint == nil {
|
||||
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
|
||||
}
|
||||
if c.config.Command == nil {
|
||||
c.config.Command = containerInfo.Config.Config.Cmd
|
||||
}
|
||||
}
|
||||
|
||||
artifacts := filepath.Join(c.config.StaticDir, artifactsDir)
|
||||
|
Reference in New Issue
Block a user