From 2548722dae1be15c61ee8db1a5eaa1d04ba7fcef Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Mon, 11 Mar 2013 17:05:01 -0700 Subject: [PATCH] Fix a bug which caused dockerd to crash at startup if a container didn't have a registered mountpoint --- container.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/container.go b/container.go index b99bf105ea..aa1acc3c4c 100644 --- a/container.go +++ b/container.go @@ -1,9 +1,9 @@ package docker import ( - "github.com/dotcloud/docker/fs" "encoding/json" "errors" + "github.com/dotcloud/docker/fs" "github.com/kr/pty" "io" "io/ioutil" @@ -129,6 +129,8 @@ func loadContainer(store *fs.Store, containerPath string, netManager *NetworkMan ) if err != nil { return nil, err + } else if mountpoint == nil { + return nil, errors.New("Couldn't load container: unregistered mountpoint.") } container := &Container{ stdout: newWriteBroadcaster(),