Skip to content

Commit 2bc955c

Browse files
committed
add reset to g1 pool too
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
1 parent 8e24692 commit 2bc955c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

driver/gurvy/bls12381/g1pool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@ func (g1JacPool) Put(v *bls12381.G1Jac) {
3131
if v == nil {
3232
panic("put called with nil value")
3333
}
34+
// reset v before putting it back
35+
v.X.SetZero()
36+
v.Y.SetZero()
37+
v.Z.SetZero()
3438
_g1JacPool.Put(v)
3539
}

0 commit comments

Comments
 (0)