summaryrefslogtreecommitdiff
path: root/src/ubf.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-05-23 14:26:17 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-05-23 14:26:17 +0000
commit6550eae6e9f3125fd2aa3deb1f9d7301ae8f5e35 (patch)
treea36ffe7fc5bb4f356c507f7d9e67c427c884f0cd /src/ubf.c
parent912aa998b518869863f8b93e717dbb4e6edd5f1d (diff)
downloadmpfr-6550eae6e9f3125fd2aa3deb1f9d7301ae8f5e35.tar.gz
[src/ubf.c] Memory leak in some case.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/ubf@10323 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/ubf.c')
-rw-r--r--src/ubf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ubf.c b/src/ubf.c
index fe596c32e..8d897c61d 100644
--- a/src/ubf.c
+++ b/src/ubf.c
@@ -197,7 +197,10 @@ mpfr_ubf_diff_exp (mpfr_srcptr x, mpfr_srcptr y)
mpz_clear (ye);
n = ABSIZ(xe); /* limb size of xe */
if (n == 0)
- return 0;
+ {
+ mpz_clear (xe);
+ return 0;
+ }
MPFR_SAVE_EXPO_MARK (expo);
mpfr_init2 (d, n * GMP_NUMB_BITS);
MPFR_DBGRES (inex = mpfr_set_z (d, xe, MPFR_RNDN));