mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-01-11 18:54:11 +00:00
Free temporary arrays
This commit is contained in:
parent
dcf68949b3
commit
f7053514b3
@ -119,6 +119,8 @@ C_KZG_RET eval_poly_l(fr_t *out, const poly_l *p, const fr_t *x, const FFTSettin
|
||||
for (i = 0; i < p->length; i++) {
|
||||
if (fr_equal(x, &fs->expanded_roots_of_unity[i * stride])) {
|
||||
*out = p->values[i];
|
||||
free(inverses_in);
|
||||
free(inverses);
|
||||
return C_KZG_OK;
|
||||
}
|
||||
fr_sub(&inverses_in[i], x, &fs->expanded_roots_of_unity[i * stride]);
|
||||
@ -137,6 +139,9 @@ C_KZG_RET eval_poly_l(fr_t *out, const poly_l *p, const fr_t *x, const FFTSettin
|
||||
fr_sub(&tmp, &tmp, &fr_one);
|
||||
fr_mul(out, out, &tmp);
|
||||
|
||||
free(inverses_in);
|
||||
free(inverses);
|
||||
|
||||
return C_KZG_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user