diff options
author | Kevin Ryde <user42@zip.com.au> | 2000-08-20 23:05:50 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2000-08-20 23:05:50 +0200 |
commit | e77668986e3a9efeed1a1b3271a2e7631cf2f068 (patch) | |
tree | c226685ac2e49c27532dca58c9c55c333c9f242c /mpz/urandomm.c | |
parent | 03e6e4c19e047f35399a88a0032c870ef4703175 (diff) | |
download | gmp-e77668986e3a9efeed1a1b3271a2e7631cf2f068.tar.gz |
* mpz/{fdiv_r_2exp.c,lcm.c,urandomm.c}: Add missing TMP_MARK/FREE,
avoiding memory leak when using stack-alloc.c.
Diffstat (limited to 'mpz/urandomm.c')
-rw-r--r-- | mpz/urandomm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mpz/urandomm.c b/mpz/urandomm.c index aa5778408..69e1bae78 100644 --- a/mpz/urandomm.c +++ b/mpz/urandomm.c @@ -39,6 +39,9 @@ mpz_urandomm (rop, rstate, n) mp_ptr tp; mp_size_t nbits, size; int count; + TMP_DECL (marker); + + TMP_MARK (marker); /* FIXME: Should check for n == 0 and report error */ @@ -70,4 +73,6 @@ mpz_urandomm (rop, rstate, n) while (mpz_cmp (t, p) >= 0); mpz_mod (rop, t, n); + + TMP_FREE (marker); } |