svn commit: r340043 - head/usr.sbin/bhyve
Marcelo Araujo
araujo at FreeBSD.org
Fri Nov 2 07:59:29 UTC 2018
Author: araujo
Date: Fri Nov 2 07:59:28 2018
New Revision: 340043
URL: https://svnweb.freebsd.org/changeset/base/340043
Log:
Fix resource leak, variable fd going out of scope.
Reported by: Coverity
CID: 1204383
Sponsored by: iXsystems Inc.
Modified:
head/usr.sbin/bhyve/pci_virtio_rnd.c
Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_rnd.c Fri Nov 2 07:57:28 2018 (r340042)
+++ head/usr.sbin/bhyve/pci_virtio_rnd.c Fri Nov 2 07:59:28 2018 (r340043)
@@ -168,6 +168,7 @@ pci_vtrnd_init(struct vmctx *ctx, struct pci_devinst *
len = read(fd, &v, sizeof(v));
if (len <= 0) {
WPRINTF(("vtrnd: /dev/random not ready, read(): %d", len));
+ close(fd);
return (1);
}
More information about the svn-src-head
mailing list