mirror of
https://github.com/mirror/make.git
synced 2025-02-06 09:40:33 +08:00
(alloca): If malloc fails, just abort.
This commit is contained in:
parent
5f99dee5b5
commit
c36430699e
3
alloca.c
3
alloca.c
@ -209,6 +209,9 @@ alloca (size)
|
|||||||
register pointer new = malloc (sizeof (header) + size);
|
register pointer new = malloc (sizeof (header) + size);
|
||||||
/* Address of header. */
|
/* Address of header. */
|
||||||
|
|
||||||
|
if (new == 0)
|
||||||
|
abort();
|
||||||
|
|
||||||
((header *) new)->h.next = last_alloca_header;
|
((header *) new)->h.next = last_alloca_header;
|
||||||
((header *) new)->h.deep = depth;
|
((header *) new)->h.deep = depth;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user