diff options
Diffstat (limited to 'release/sysinstall/misc.c')
| -rw-r--r-- | release/sysinstall/misc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/release/sysinstall/misc.c b/release/sysinstall/misc.c index 4f789e2bea3a..794c49888fb6 100644 --- a/release/sysinstall/misc.c +++ b/release/sysinstall/misc.c @@ -1,7 +1,7 @@ /* * Miscellaneous support routines.. * - * $Id: misc.c,v 1.1.1.1 1995/04/27 12:50:35 jkh Exp $ + * $Id: misc.c,v 1.2 1995/04/29 19:33:04 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -98,6 +98,18 @@ safe_free(void *ptr) free(ptr); } +/* A malloc that checks errors */ +void * +safe_malloc(size_t size) +{ + void *ptr; + + ptr = malloc(size); + if (!ptr) + msgFatal("Out of memory!"); + return ptr; +} + /* * These next routines are kind of specialized just for building string lists * for dialog_menu(). |
