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:
parent
77ae9789d3
commit
a63ff8da46
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue