Return ARCHIVE_FATAL if we can't allocate memory instead of going ahead and

dereferencing NULL.

Found by:	Coverity Prevent
This commit is contained in:
Colin Percival 2008-05-19 18:06:48 +00:00
parent 47dbd0cfbc
commit ee99deabac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179125

View file

@ -596,6 +596,7 @@ read_data(struct archive_read *a, const void **buff, size_t *size, off_t *offset
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory");
}
return (ARCHIVE_FATAL);
}
*buff = mtree->buff;