git: 8ac8adda8dba - main - bhyve: avoid uninitialized variable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Apr 2022 09:19:42 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=8ac8adda8dbaceebd296e4fd7df36b7a8db7f6d3
commit 8ac8adda8dbaceebd296e4fd7df36b7a8db7f6d3
Author: Corvin Köhne <CorvinK@beckhoff.com>
AuthorDate: 2022-04-01 08:19:53 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-04-01 09:13:16 +0000
bhyve: avoid uninitialized variable
Reviewed by: markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
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;