The malloc will return NULL if it can't allocate memory.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-18 05:19:45 +00:00
parent 6a35cae5ed
commit bb0bd931dc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298180

View File

@ -492,7 +492,7 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
iobufsize = SBLOCKSIZE + 3 * sblock.fs_bsize;
else
iobufsize = 4 * sblock.fs_bsize;
if ((iobuf = malloc(iobufsize)) == 0) {
if ((iobuf = malloc(iobufsize)) == NULL) {
printf("Cannot allocate I/O buffer\n");
exit(38);
}