Skip to content

Commit

Permalink
ensure next is fully initialized before use - fixes #650
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronhurt committed Apr 23, 2019
1 parent bdc0364 commit 848c27f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,8 @@ func watchBackend(cfg *config.Config, first chan bool) {
svccfg string
mancfg string
customBE string
next *bytes.Buffer

once sync.Once
once sync.Once
next = new(bytes.Buffer) // fix crash on reset before used (#650)
)

switch cfg.Registry.Backend {
Expand Down

0 comments on commit 848c27f

Please sign in to comment.