The branch main has been updated by manu:

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

commit 8ac8adda8dbaceebd296e4fd7df36b7a8db7f6d3
Author:     Corvin Köhne <[email protected]>
AuthorDate: 2022-04-01 08:19:53 +0000
Commit:     Emmanuel Vadot <[email protected]>
CommitDate: 2022-04-01 09:13:16 +0000

    bhyve: avoid uninitialized variable
    
    Reviewed by:    markj
    Signed-off-by: Corvin Köhne <[email protected]>
    Reported-by: Andy Fiddaman <[email protected]>
    Differential Revision:  https://reviews.freebsd.org/D34688
---
 usr.sbin/bhyve/pci_emul.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c
index ab90c01c2394..9bcd3223007a 100644
--- a/usr.sbin/bhyve/pci_emul.c
+++ b/usr.sbin/bhyve/pci_emul.c
@@ -825,6 +825,8 @@ pci_emul_assign_bar(struct pci_devinst *const pdi, const 
int idx,
                error = pci_emul_alloc_resource(baseptr, limit, size, &addr);
                if (error != 0)
                        return (error);
+       } else {
+               addr = 0;
        }
 
        pdi->pi_bar[idx].type = type;

Reply via email to