summaryrefslogtreecommitdiff
path: root/src/alloca.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-01-07 07:00:56 +0000
committerKarl Heuer <kwzh@gnu.org>1996-01-07 07:00:56 +0000
commit5349740c6834a85b2b55c308addf2fcc21aa0017 (patch)
tree9c4319676db18dccdc3230658f6ba2ec8e67495d /src/alloca.c
parent24747588cf97e08c00e4a539fc14173697dc5b07 (diff)
downloademacs-5349740c6834a85b2b55c308addf2fcc21aa0017.tar.gz
(alloca): If malloc fails, just abort.
Diffstat (limited to 'src/alloca.c')
-rw-r--r--src/alloca.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/alloca.c b/src/alloca.c
index 7020f32c882..7061cec2d31 100644
--- a/src/alloca.c
+++ b/src/alloca.c
@@ -209,6 +209,9 @@ alloca (size)
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
+ if (new == 0)
+ abort();
+
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;