diff --git a/runtime/vam/op/exprswitch.go b/runtime/vam/op/exprswitch.go index e4d55f459a..e9e0f3f7da 100644 --- a/runtime/vam/op/exprswitch.go +++ b/runtime/vam/op/exprswitch.go @@ -36,7 +36,7 @@ func (s *ExprSwitch) AddCase(val *super.Value) vector.Puller { } func (s *ExprSwitch) forward(vec vector.Any) bool { - clear(s.caseIndexes) + defer clear(s.caseIndexes) exprVec := s.expr.Eval(vec) for i := range exprVec.Len() { s.builder.Truncate()