From 1c38da32d4fa7351c8ecd7245c4e54da49d95c0f Mon Sep 17 00:00:00 2001 From: seanc Date: Thu, 11 Jul 2019 19:41:14 +0000 Subject: [PATCH] usr.sbin/bhyve: free leaked memory during option parsing Also update to use strsep(3) instead of strtok(3). Most of this commit inadvertently ended up in r349914. Coverity CID: 1357337 Approved by: markj PR: 233038 Differential Revision: https://reviews.freebsd.org/D20918 --- usr.sbin/bhyve/pci_fbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index beba904061f..78b118dfa08 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -317,7 +317,7 @@ pci_fbuf_parse_opts(struct pci_fbuf_softc *sc, char *opts) } done: - free(uopts); + free(uoptsbak); return (ret); } -- 2.45.2