aboutsummaryrefslogtreecommitdiffstats
path: root/prog/mutation.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <wp32pw@gmail.com>2024-03-08 17:24:27 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2024-03-08 16:36:20 +0000
commit96d142e71b8a8a5affdab6f1c033799510040cce (patch)
treeb8b8a6aec40c6eb6d624c894eda84c291a9de129 /prog/mutation.go
parent0b3e125fda2e386091985b4b57231dd19341f64e (diff)
Revert "prog: fix resource leak during replaceArg() of union fields"
This reverts commit 6387f6b7d487e2a77d753ad28c1074e39c17c3ca.
Diffstat (limited to 'prog/mutation.go')
-rw-r--r--prog/mutation.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/prog/mutation.go b/prog/mutation.go
index 54f88c175..cf93ce4eb 100644
--- a/prog/mutation.go
+++ b/prog/mutation.go
@@ -505,6 +505,7 @@ func (t *UnionType) mutate(r *randGen, s *state, arg Arg, ctx ArgCtx) (calls []*
index++
}
optType, optDir := t.Fields[index].Type, t.Fields[index].Dir(a.Dir())
+ removeArg(a.Option)
var newOpt Arg
newOpt, calls = r.generateArg(s, optType, optDir)
replaceArg(arg, MakeUnionArg(t, a.Dir(), newOpt, index))