Author: seanc (ports committer) Date: Fri Jul 12 18:20:56 2019 New Revision: 349946 URL: https://svnweb.freebsd.org/changeset/base/349946
Log: usr.sbin/bhyve: free resources when erroring out of pci_vtcon_sock_add() Coverity CID: 1362880 Approved by: markj, jhb Differential Revision: https://reviews.freebsd.org/D20916 Modified: head/usr.sbin/bhyve/pci_virtio_console.c Modified: head/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_console.c Fri Jul 12 18:17:35 2019 (r349945) +++ head/usr.sbin/bhyve/pci_virtio_console.c Fri Jul 12 18:20:56 2019 (r349946) @@ -356,8 +356,11 @@ out: if (fd != -1) close(fd); - if (error != 0 && s != -1) - close(s); + if (error != 0) { + if (s != -1) + close(s); + free(sock); + } return (error); } _______________________________________________ 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"