Author: emaste Date: Wed May 31 16:28:29 2017 New Revision: 319342 URL: https://svnweb.freebsd.org/changeset/base/319342
Log: makefs: free buf in case of error CID: 270190 Submitted by: Siva Mahadevan <[email protected]> Reported by: Coverity Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11011 Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Wed May 31 16:24:02 2017 (r319341) +++ head/usr.sbin/makefs/ffs.c Wed May 31 16:28:29 2017 (r319342) @@ -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; } _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
