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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to