Skip to content

Commit

Permalink
fix: fix memory aliasing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenschneider committed Sep 6, 2023
1 parent f9a3f47 commit 8483897
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/deps/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func BuildGroups(groupUpdates chan *group.Group, conf *internal.ConditionalReboo
var groups []*group.Group

for _, groupConf := range conf.Groups {
groupConf := groupConf
group, err := BuildGroup(groupUpdates, &groupConf)
if err != nil {
return nil, fmt.Errorf("could not build group '%s': %w", groupConf.Name, err)
Expand Down
1 change: 1 addition & 0 deletions cmd/deps/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func BuildGroup(groupUpdates chan *group.Group, conf *internal.GroupConf) (*grou
func BuildAgents(conf *internal.GroupConf) ([]state.Agent, error) {
var agents []state.Agent
for _, agentConf := range conf.Agents {
agentConf := agentConf
agent, err := BuildAgent(&agentConf)
if err != nil {
return nil, err
Expand Down

0 comments on commit 8483897

Please sign in to comment.