diff --git a/registry/gossip/util.go b/registry/gossip/util.go index 5e44e375e9..0fa8116d18 100644 --- a/registry/gossip/util.go +++ b/registry/gossip/util.go @@ -76,7 +76,7 @@ func addServices(old, neu []*registry.Service) []*registry.Service { var seen bool for _, o := range old { if o.Version == s.Version { - var sp *registry.Service + sp := new(registry.Service) // make copy *sp = *o // set nodes