Date: Fri, 2 Nov 2018 07:57:28 +0000 (UTC) From: Marcelo Araujo <araujo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340042 - head/usr.sbin/bhyve Message-ID: <201811020757.wA27vSrk033848@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811020757.wA27vSrk033848>