From 8ac8adda8dbaceebd296e4fd7df36b7a8db7f6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corvin=20K=C3=B6hne?= Date: Fri, 1 Apr 2022 10:19:53 +0200 Subject: [PATCH] bhyve: avoid uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed by: markj Signed-off-by: Corvin Köhne Reported-by: Andy Fiddaman 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 ab90c01c239..9bcd3223007 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;