blob: a478bb29be62486d4e7f1488c811886ea7c58802 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$NetBSD: patch-gc,v 1.1.2.2 2002/08/25 21:20:10 jlam Exp $
This is a patch for 4.1 from the GNU MP Homepage, it should be
removed in future versions
--- mpf/inp_str.c.old Tue Jan 2 18:53:42 2001
+++ mpf/inp_str.c Wed Jul 3 10:57:33 2002
@@ -64,6 +64,7 @@
c = getc (stream);
}
ungetc (c, stream);
+ nread--;
if (str_size >= alloc_size)
{
@@ -74,9 +75,10 @@
str[str_size] = 0;
retval = mpf_set_str (rop, str, base);
+ (*__gmp_free_func) (str, alloc_size);
+
if (retval == -1)
return 0; /* error */
- (*__gmp_free_func) (str, alloc_size);
return str_size + nread;
}
|