1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

makefs: free buf in case of error

CID:		270190
Submitted by:	Siva Mahadevan <smahadevan@freebsdfoundation.org>
Reported by:	Coverity
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D11011
This commit is contained in:
Ed Maste 2017-05-31 16:28:29 +00:00
parent c2676069cb
commit 5d7af8bb02
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319342

View File

@ -523,6 +523,7 @@ ffs_create_image(const char *image, fsinfo_t *fsopts)
if (fsopts->offset != 0)
if (lseek(fsopts->fd, fsopts->offset, SEEK_SET) == -1) {
warn("can't seek");
free(buf);
return -1;
}