summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/misc.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-01 21:56:32 +0000
committerjkh <jkh@FreeBSD.org>1995-05-01 21:56:32 +0000
commite3598880e349017837533ba4e1967b87751ddeff (patch)
tree66e8a7a94085501f4c4c4f035003b8f42ba879d5 /release/sysinstall/misc.c
parentd0d51976ab3315b9d155a3551f319e36b88b260c (diff)
downloadFreeBSD-src-e3598880e349017837533ba4e1967b87751ddeff.zip
FreeBSD-src-e3598880e349017837533ba4e1967b87751ddeff.tar.gz
Commit my latest changes before having a nap. Still not close to done,
nor is it in sync with my working sources, but it leaves me less CVS hassles to bring in the new files at this time. Still no documentation to translate quite yet, but soon. This stuff is actually very close now.
Diffstat (limited to 'release/sysinstall/misc.c')
-rw-r--r--release/sysinstall/misc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/release/sysinstall/misc.c b/release/sysinstall/misc.c
index 4f789e2..794c498 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().
OpenPOWER on IntegriCloud