Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2022 15:24:43 GMT
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 8c119b3b711d - stable/13 - bhyve: avoid uninitialized variable
Message-ID:  <202205161524.24GFOhW2006630@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by manu:

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

commit 8c119b3b711dc256b97c258e6ca23547a0fffc99
Author:     Corvin Köhne <CorvinK@beckhoff.com>
AuthorDate: 2022-04-01 08:19:53 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-05-16 15:24:33 +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
    (cherry picked from commit 8ac8adda8dbaceebd296e4fd7df36b7a8db7f6d3)
---
 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 8cadc0580311..b58a51bce78b 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205161524.24GFOhW2006630>