The branch main has been updated by novel (ports committer):

URL: 
https://cgit.FreeBSD.org/src/commit/?id=f2ecc0d1b7d569b4b2c930c7450390c04778ee8a

commit f2ecc0d1b7d569b4b2c930c7450390c04778ee8a
Author:     Roman Bogorodskiy <no...@freebsd.org>
AuthorDate: 2021-04-08 14:44:58 +0000
Commit:     Roman Bogorodskiy <no...@freebsd.org>
CommitDate: 2021-04-08 14:44:58 +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
---
 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 fed18ce5a8cc..f96d53858225 100644
--- a/usr.sbin/bhyve/pci_virtio_9p.c
+++ b/usr.sbin/bhyve/pci_virtio_9p.c
@@ -224,7 +224,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);
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to