1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix a crash in graphdriver init

This commit is contained in:
Solomon Hykes 2013-11-07 20:31:50 +00:00
parent 77ae9789d3
commit a63ff8da46

View file

@ -36,6 +36,10 @@ var (
}
)
func init() {
drivers = make(map[string]InitFunc)
}
func Register(name string, initFunc InitFunc) error {
if _, exists := drivers[name]; exists {
return fmt.Errorf("Name already registered %s", name)