summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-15 04:52:33 -0700
committerGitHub <noreply@github.com>2019-03-15 04:52:33 -0700
commitf4c41961e3b9f164016435d4121b3ff041f7beab (patch)
tree66688571bb51e03d203b8e4e3c015d23b88c4c53
parent39859850aec4d0d3fe8bcf7804f6f02a245e2b6e (diff)
parent508e08410b3e87f28dc5f647f673ad6a651c65a1 (diff)
downloadpodman-f4c41961e3b9f164016435d4121b3ff041f7beab.tar.gz
podman-f4c41961e3b9f164016435d4121b3ff041f7beab.tar.bz2
podman-f4c41961e3b9f164016435d4121b3ff041f7beab.zip
Merge pull request #2656 from giuseppe/fix-rootfs-segfault
container: check containerInfo.Config before accessing it
-rw-r--r--libpod/container_internal.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index bea7acd69..872802016 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -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)