Explorar o código

Fix a crash in graphdriver init

Solomon Hykes %!s(int64=11) %!d(string=hai) anos
pai
achega
a63ff8da46
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      graphdriver/driver.go

+ 4 - 0
graphdriver/driver.go

@@ -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)