From 4bd989a02a32c6f602e6a3efbcc26f701c513a4d Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Mon, 19 Dec 2022 15:35:39 -0600 Subject: [PATCH] Remove free because it's freed later --- src/c_kzg_4844.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c_kzg_4844.c b/src/c_kzg_4844.c index 93f6f53..fc9afed 100644 --- a/src/c_kzg_4844.c +++ b/src/c_kzg_4844.c @@ -1283,9 +1283,10 @@ C_KZG_RET verify_aggregate_kzg_proof(bool *out, KZGCommitment aggregated_poly_commitment; BLSFieldElement evaluation_challenge; ret = compute_aggregated_poly_and_commitment(aggregated_poly, &aggregated_poly_commitment, &evaluation_challenge, polys, expected_kzg_commitments, n); + if (ret != C_KZG_OK) goto free_out; + free(polys); polys = NULL; - if (ret != C_KZG_OK) goto free_out; BLSFieldElement y; ret = evaluate_polynomial_in_evaluation_form(&y, aggregated_poly, &evaluation_challenge, s);