summaryrefslogtreecommitdiff
path: root/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
commitc36430699e4ec1b6a30cdea4504d994bf1ff09f1 (patch)
treee40f9ee5e0e3bd28e6c799f7cd68834222d59a18 /alloca.c
parent5f99dee5b543f1ec82d0a64d8eb36ff31e0f5042 (diff)
downloadgunmake-c36430699e4ec1b6a30cdea4504d994bf1ff09f1.tar.gz
(alloca): If malloc fails, just abort.
Diffstat (limited to 'alloca.c')
-rw-r--r--alloca.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/alloca.c b/alloca.c
index 7020f32..7061cec 100644
--- a/alloca.c
+++ b/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;