diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index bbed822..2bbf43a 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -95,7 +95,7 @@
 
 	if (bufsize < 4096)
 		bufsize = 4096;
-	buf = (char *) malloc(bufsize);
+	buf = (char *) xmalloc(bufsize);
 	n = klogctl(cmd, buf, bufsize);
 	if (n < 0) {
 		goto klogctl_error;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index cfa973e..47e81ce 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -603,23 +603,13 @@
 
 static void read_tables(void)
 {
-	inode_map = malloc(IMAPS * BLOCK_SIZE);
-	if (!inode_map)
-		die("Unable to allocate buffer for inode map");
-	zone_map = malloc(ZMAPS * BLOCK_SIZE);
-	if (!inode_map)
-		die("Unable to allocate buffer for zone map");
+	inode_map = xmalloc(IMAPS * BLOCK_SIZE);
+	zone_map = xmalloc(ZMAPS * BLOCK_SIZE);
 	memset(inode_map, 0, sizeof(inode_map));
 	memset(zone_map, 0, sizeof(zone_map));
-	inode_buffer = malloc(INODE_BUFFER_SIZE);
-	if (!inode_buffer)
-		die("Unable to allocate buffer for inodes");
-	inode_count = malloc(INODES + 1);
-	if (!inode_count)
-		die("Unable to allocate buffer for inode count");
-	zone_count = malloc(ZONES);
-	if (!zone_count)
-		die("Unable to allocate buffer for zone count");
+	inode_buffer = xmalloc(INODE_BUFFER_SIZE);
+	inode_count = xmalloc(INODES + 1);
+	zone_count = xmalloc(ZONES);
 	if (IMAPS * BLOCK_SIZE != read(IN, inode_map, IMAPS * BLOCK_SIZE))
 		die("Unable to read inode map");
 	if (ZMAPS * BLOCK_SIZE != read(IN, zone_map, ZMAPS * BLOCK_SIZE))
@@ -1247,18 +1237,9 @@
 {
 	int i;
 
-	name_list = malloc(sizeof(char *) * MAX_DEPTH);
-	if (!name_list) { 
-		fprintf(stderr,"fsck_minix: name_list: %s\n", strerror(errno));
-		exit(1); 
-	}
-	for (i = 0; i < MAX_DEPTH; i++) {
-		name_list[i] = malloc(sizeof(char) * PATH_MAX + 1);
-		if (!name_list[i]) {
-			fprintf(stderr,"fsck_minix: name_list: %s\n", strerror(errno));
-			exit(1); 
-		}
-	}
+	name_list = xmalloc(sizeof(char *) * MAX_DEPTH);
+	for (i = 0; i < MAX_DEPTH; i++)
+		name_list[i] = xmalloc(sizeof(char) * PATH_MAX + 1);
 }
 
 /* execute this atexit() to deallocate name_list[] */
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 4435cb6..1ee3d4c 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -530,19 +530,15 @@
 		die("unable to allocate buffers for maps");
 	}
 	FIRSTZONE = NORM_FIRSTZONE;
-	inode_map = malloc(IMAPS * BLOCK_SIZE);
-	zone_map = malloc(ZMAPS * BLOCK_SIZE);
-	if (!inode_map || !zone_map)
-		die("unable to allocate buffers for maps");
+	inode_map = xmalloc(IMAPS * BLOCK_SIZE);
+	zone_map = xmalloc(ZMAPS * BLOCK_SIZE);
 	memset(inode_map, 0xff, IMAPS * BLOCK_SIZE);
 	memset(zone_map, 0xff, ZMAPS * BLOCK_SIZE);
 	for (i = FIRSTZONE; i < ZONES; i++)
 		unmark_zone(i);
 	for (i = MINIX_ROOT_INO; i <= INODES; i++)
 		unmark_inode(i);
-	inode_buffer = malloc(INODE_BUFFER_SIZE);
-	if (!inode_buffer)
-		die("unable to allocate buffer for inodes");
+	inode_buffer = xmalloc(INODE_BUFFER_SIZE);
 	memset(inode_buffer, 0, INODE_BUFFER_SIZE);
 	printf("%ld inodes\n", INODES);
 	printf("%ld blocks\n", ZONES);
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 130d241..17866a7 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -116,7 +116,7 @@
 	if (pagesize != PAGE_SIZE)
 		fprintf(stderr, "Assuming pages of size %d\n", pagesize);
 #endif
-	signature_page = (int *) malloc(pagesize);
+	signature_page = (int *) xmalloc(pagesize);
 	memset(signature_page, 0, pagesize);
 	p = (struct swap_header_v1 *) signature_page;
 }
@@ -230,9 +230,7 @@
 	int do_seek = 1;
 	char *buffer;
 
-	buffer = malloc(pagesize);
-	if (!buffer)
-		die("Out of memory");
+	buffer = xmalloc(pagesize);
 	current_page = 0;
 	while (current_page < PAGES) {
 		if (!check) {
diff --git a/util-linux/umount.c b/util-linux/umount.c
index b0f393c..6661db8 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -89,8 +89,7 @@
 		return;
 	}
 	while ((e = getmntent(fp))) {
-		entry = malloc(sizeof(struct _mtab_entry_t));
-
+		entry = xmalloc(sizeof(struct _mtab_entry_t));
 		entry->device = strdup(e->mnt_fsname);
 		entry->mountpt = strdup(e->mnt_dir);
 		entry->next = mtab_cache;
