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:
parent
c2676069cb
commit
5d7af8bb02
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319342
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user