diff --git a/govc/vm/snapshot/tree.go b/govc/vm/snapshot/tree.go index edc35a476..8fb8e3533 100644 --- a/govc/vm/snapshot/tree.go +++ b/govc/vm/snapshot/tree.go @@ -85,6 +85,8 @@ func (cmd *tree) Process(ctx context.Context) error { func (cmd *tree) write(level int, parent string, pref *types.ManagedObjectReference, st []types.VirtualMachineSnapshotTree) { for _, s := range st { + s := s // avoid implicit memory aliasing + sname := s.Name if cmd.fullPath && parent != "" {