Skip to content

Commit

Permalink
Merge pull request #1423 from rburing/fix_some_test_leaks
Browse files Browse the repository at this point in the history
Fix some memory leaks in tests
  • Loading branch information
fredrik-johansson authored Sep 8, 2023
2 parents 411a084 + fef2cb5 commit 993402e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/acb_poly/test/t-inv_series.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ int main(void)
acb_poly_clear(a);
acb_poly_clear(b);
acb_poly_clear(ab);
fmpq_poly_clear(id);
}

flint_randclear(state);
Expand Down
1 change: 1 addition & 0 deletions src/acb_poly/test/t-zeta_em_tail_bsplit.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ int main(void)

acb_clear(Na);
acb_clear(s);
_acb_vec_clear(Nasx, len);
_acb_vec_clear(z1, len);
_acb_vec_clear(z2, len);
}
Expand Down
1 change: 1 addition & 0 deletions src/aprcl/test/t-unity_zp_reduce_cyclotomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ int main(void)
unity_zp_clear(g);
}

fmpz_mod_ctx_clear(ctx);
FLINT_TEST_CLEANUP(state);

flint_printf("PASS\n");
Expand Down
2 changes: 2 additions & 0 deletions src/bernoulli/test/t-rev.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ int main(void)
fmpz_clear(denom);
}

nmod_poly_clear(A);

flint_randclear(state);
flint_cleanup();
flint_printf("PASS\n");
Expand Down
1 change: 1 addition & 0 deletions src/fmpz/test/t-xgcd_canonical_bezout.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ main(void)
fmpz_clear(G);
}

fmpz_clear(maxval);
fmpz_clear(nd);
fmpz_clear(na);
fmpz_clear(nb);
Expand Down
2 changes: 2 additions & 0 deletions src/fq_nmod/test/t-mul_si.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ main(void)
}
}

fq_nmod_clear(rop, ctx);

fq_nmod_ctx_clear(ctx);
fmpz_clear(p);
fmpz_clear(f);
Expand Down
1 change: 1 addition & 0 deletions src/fq_templates/test/t-sqrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ main(void)
TEMPLATE(T, clear)(b, ctx);
TEMPLATE(T, clear)(c, ctx);
TEMPLATE(T, clear)(d, ctx);
TEMPLATE(T, clear)(x, ctx);
}

TEMPLATE(T, ctx_clear)(ctx);
Expand Down
1 change: 1 addition & 0 deletions src/gr_mat/test/t-inv.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ int main(void)

gr_mat_clear(A, ctx);
gr_mat_clear(B, ctx);
gr_mat_clear(AB, ctx);

gr_ctx_clear(ctx);
}
Expand Down

0 comments on commit 993402e

Please sign in to comment.