]> xenbits.xensource.com Git - seabios.git/commit
nvme: avoid use-after-free in nvme_controller_enable()
authorJan Beulich via SeaBIOS <seabios@seabios.org>
Mon, 24 Jan 2022 09:20:53 +0000 (10:20 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 27 Jan 2022 16:32:47 +0000 (11:32 -0500)
commitdc776a2d9ca9e1b857e880ff682668871369b4c3
treeac25755bdcb457619d7d60b43d2d71350c8e8202
parent15a102e062af18e01daece409ee54765a3b4ec13
nvme: avoid use-after-free in nvme_controller_enable()

Commit b68f313c9139 ("nvme: Record maximum allowed request size")
introduced a use of "identify" past it being passed to free(). Latch the
value of interest into a local variable.

Reported-by: Coverity (ID 1497613)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
src/hw/nvme.c