summaryrefslogtreecommitdiff
path: root/inp_str.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 13:19:42 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 13:19:42 +0000
commit3ed10d1095d8b0376432a264ef1e51d6b7122b40 (patch)
treeedc5710da0e4a49700dce8793394b46c9fc75fc5 /inp_str.c
parent0f1bb25ee90fe8b6f67805dd830b1371557774a5 (diff)
downloadmpfr-3ed10d1095d8b0376432a264ef1e51d6b7122b40.tar.gz
return -> MPFR_RET, patch d'un leak dans inp_str.c
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1546 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'inp_str.c')
-rw-r--r--inp_str.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/inp_str.c b/inp_str.c
index 8417989d2..a218f8c3c 100644
--- a/inp_str.c
+++ b/inp_str.c
@@ -78,9 +78,10 @@ mpfr_inp_str (mpfr_ptr rop, FILE *stream, int base, mp_rnd_t rnd_mode)
str[str_size] = 0;
retval = mpfr_set_str (rop, str, base, rnd_mode);
+ (*__gmp_free_func) (str, alloc_size);
+
if (retval == -1)
return 0; /* error */
- (*__gmp_free_func) (str, alloc_size);
return str_size + nread;
}