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
commite118218fae1502a78fdeeaf017c478a4ecddfc34 (patch)
tree62fc833bebb6e62ac98714e673e13cab3a1f4596 /src/alloca.c
parent3e8258e7f5de89fff0cd902f3786a57ce93a7a02 (diff)
downloademacs-e118218fae1502a78fdeeaf017c478a4ecddfc34.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;