summaryrefslogtreecommitdiffstats
path: root/fdisk/sfdisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'fdisk/sfdisk.c')
-rw-r--r--fdisk/sfdisk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index f549c6413..a090772a8 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -305,10 +305,8 @@ restore_sectors(char *dev) {
error(_("partition restore file has wrong size - not restoring\n"));
goto err;
}
- if (!(ss0 = (char *)malloc(statbuf.st_size))) {
- error(_("out of memory?\n"));
- goto err;
- }
+
+ ss0 = xmalloc(statbuf.st_size);
ss = ss0;
fdin = open(restore_sector_file, O_RDONLY);