Unverified Commit af31ccef authored by Daniel Hiltgen's avatar Daniel Hiltgen Committed by GitHub
Browse files

fix data race in WriteGGUF (#10598)

err in the go routine should not be shared with the outer scope
parent fa393554
......@@ -569,7 +569,7 @@ func WriteGGUF(f *os.File, kv KV, ts []*Tensor) error {
t := t
w := io.NewOffsetWriter(f, offset+int64(t.Offset))
g.Go(func() error {
_, err = t.WriteTo(w)
_, err := t.WriteTo(w)
return err
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment