The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=001f3d25518c9179136629abf5ab42cab58c9347
commit 001f3d25518c9179136629abf5ab42cab58c9347 Author: Roman Bogorodskiy <[email protected]> AuthorDate: 2021-04-08 14:44:58 +0000 Commit: John Baldwin <[email protected]> CommitDate: 2021-08-11 22:12:42 +0000 bhyve: fix regression in legacy virtio-9p config parsing Commit 621b5090487de9fed1b503769702a9a2a27cc7bb introduced a regression in legacy virtio-9p config parsing by not initializing *sharename to NULL. As a result, "sharename != NULL" check in the first iteration fails and bhyve exits with "virtio-9p: more than one share name given". Fix by adding NULL back. Approved by: grehan (cherry picked from commit f2ecc0d1b7d569b4b2c930c7450390c04778ee8a) --- usr.sbin/bhyve/pci_virtio_9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_virtio_9p.c b/usr.sbin/bhyve/pci_virtio_9p.c index 10023158f8bd..6c6dc483b7ba 100644 --- a/usr.sbin/bhyve/pci_virtio_9p.c +++ b/usr.sbin/bhyve/pci_virtio_9p.c @@ -232,7 +232,7 @@ pci_vt9p_notify(void *vsc, struct vqueue_info *vq) static int pci_vt9p_legacy_config(nvlist_t *nvl, const char *opts) { - char *sharename, *tofree, *token, *tokens; + char *sharename = NULL, *tofree, *token, *tokens; if (opts == NULL) return (0); _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
