Avoid nil pointer dereference while creating a container with an empty Config

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 4ce817796e639391f6bc3e338f5a88985daacaca
Component: engine
This commit is contained in:
Antonio Murdaca
2015-06-06 20:07:32 +02:00
parent ddadb07458
commit 6aab6b5654
5 changed files with 25 additions and 4 deletions
-4
View File
@@ -658,10 +658,6 @@ func (s *Server) postCommit(version version.Version, w http.ResponseWriter, r *h
return err
}
if c == nil {
c = &runconfig.Config{}
}
containerCommitConfig := &daemon.ContainerCommitConfig{
Pause: pause,
Repo: r.Form.Get("repo"),