svn commit: r340042 - head/usr.sbin/bhyve

Marcelo Araujo araujo at FreeBSD.org
Fri Nov 2 07:57:29 UTC 2018


Author: araujo
Date: Fri Nov  2 07:57:28 2018
New Revision: 340042
URL: https://svnweb.freebsd.org/changeset/base/340042

Log:
  Fix resource leak, variables cp, xopts and nopt going out of scope.
  
  Reported by:	Coverity
  CID:		1305412
  Sponsored by:	iXsystems Inc.

Modified:
  head/usr.sbin/bhyve/block_if.c

Modified: head/usr.sbin/bhyve/block_if.c
==============================================================================
--- head/usr.sbin/bhyve/block_if.c	Fri Nov  2 07:48:23 2018	(r340041)
+++ head/usr.sbin/bhyve/block_if.c	Fri Nov  2 07:57:28 2018	(r340042)
@@ -573,6 +573,9 @@ blockif_open(const char *optstr, const char *ident)
 err:
 	if (fd >= 0)
 		close(fd);
+	free(cp);
+	free(xopts);
+	free(nopt);
 	return (NULL);
 }
 


More information about the svn-src-head mailing list