git: d4e643f6a51d - stable/12 - bhyve nvme: Fix uninitialized pointer
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Jan 2023 21:08:58 UTC
The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d4e643f6a51d7fb8d8523419196449faa5fa047d commit d4e643f6a51d7fb8d8523419196449faa5fa047d Author: Chuck Tuffli <chuck@FreeBSD.org> AuthorDate: 2022-06-09 20:05:46 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-01-20 21:08:28 +0000 bhyve nvme: Fix uninitialized pointer The Dataset Management code could free an uninitialized pointer if the device doesn't support the Dataset Management command. PR: 264548 Reported by: Robert Morris <rtm@lcs.mit.edu> (cherry picked from commit 7376c08cc67e65ee660d51873129e34745ef5dd4) (cherry picked from commit c84ec3076e7de10d7475fd9694ad64603e264d88) --- usr.sbin/bhyve/pci_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 5f7a13d492f2..0d5324a8977b 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -2103,7 +2103,7 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, struct pci_nvme_ioreq *req, uint16_t *status) { - struct nvme_dsm_range *range; + struct nvme_dsm_range *range = NULL; uint32_t nr, r, non_zero, dr; int err; bool pending = false;