Free g1_projective after its final use

This commit is contained in:
Justin Traglia 2022-12-19 13:29:39 -06:00
parent 4999bd85e1
commit 4eb9de62d0
1 changed files with 4 additions and 0 deletions

View File

@ -813,6 +813,10 @@ C_KZG_RET load_trusted_setup(KZGSettings *out, const uint8_t g1_bytes[], size_t
if (ret != C_KZG_OK) goto error_free_out; if (ret != C_KZG_OK) goto error_free_out;
ret = fft_g1(out->g1_values, g1_projective, true, n1, out->fs); ret = fft_g1(out->g1_values, g1_projective, true, n1, out->fs);
if (ret != C_KZG_OK) goto error_free_out; if (ret != C_KZG_OK) goto error_free_out;
free(g1_projective);
g1_projective = NULL;
ret = reverse_bit_order(out->g1_values, sizeof(g1_t), n1); ret = reverse_bit_order(out->g1_values, sizeof(g1_t), n1);
if (ret != C_KZG_OK) goto error_free_out; if (ret != C_KZG_OK) goto error_free_out;