svn commit: r319342 - head/usr.sbin/makefs

Ed Maste emaste at FreeBSD.org
Wed May 31 16:28:31 UTC 2017


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 <smahadevan at freebsdfoundation.org>
  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;
 		}
 


More information about the svn-src-all mailing list