From a21f2019a03975836b0e7a9321f6f003df1db002 Mon Sep 17 00:00:00 2001 From: Termina1 Date: Tue, 24 Dec 2024 12:59:01 +0200 Subject: [PATCH] fix possible iterator leak --- orm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/orm.go b/orm.go index cfd96b1..0ecc1c0 100644 --- a/orm.go +++ b/orm.go @@ -76,6 +76,7 @@ func (orm *ORM) Save(ctx context.Context, objs ...NativeObject) (err error) { cid := rdx.IDFromZipBytes(it.Value()) fields, e := orm.Host.ClassFields(cid) if e != nil { + _ = it.Close() return e } var changes protocol.Records