summaryrefslogtreecommitdiff
path: root/lib/libc/gdtoa/dmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gdtoa/dmisc.c')
-rw-r--r--lib/libc/gdtoa/dmisc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/gdtoa/dmisc.c b/lib/libc/gdtoa/dmisc.c
index ce170c733bf..585cbfc9a56 100644
--- a/lib/libc/gdtoa/dmisc.c
+++ b/lib/libc/gdtoa/dmisc.c
@@ -50,6 +50,12 @@ rv_alloc(int i)
j <<= 1)
k++;
r = (int*)Balloc(k);
+ if (r == NULL)
+ return (
+#ifndef MULTIPLE_THREADS
+ dtoa_result =
+#endif
+ NULL);
*r = k;
return
#ifndef MULTIPLE_THREADS
@@ -68,6 +74,8 @@ nrv_alloc(char *s, char **rve, int n)
char *rv, *t;
t = rv = rv_alloc(n);
+ if (t == NULL)
+ return NULL;
while((*t = *s++) !=0)
t++;
if (rve)