Skip to content

Commit

Permalink
fix: fix slice init length (#1288)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 7, 2024
1 parent f776f36 commit ca8e156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion profile/internal/graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ func newTree(prof *profile.Profile, o *Options) (g *Graph) {
}
}

nodes := make(Nodes, len(prof.Location))
nodes := make(Nodes, 0, len(prof.Location))
for _, nm := range parentNodeMap {
nodes = append(nodes, nm.nodes()...)
}
Expand Down

0 comments on commit ca8e156

Please sign in to comment.