mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05: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:
parent
c2676069cb
commit
5d7af8bb02
1 changed files with 1 additions and 0 deletions
|
|
@ -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 a new issue