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
This commit is contained in:
seanc 2019-07-11 19:41:14 +00:00
parent 0504042068
commit 1c38da32d4

View File

@ -317,7 +317,7 @@ pci_fbuf_parse_opts(struct pci_fbuf_softc *sc, char *opts)
}
done:
free(uopts);
free(uoptsbak);
return (ret);
}