mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 21:40:49 +00:00
spapr: fix write-past-end-of-array error in cpu core device init code
This fixes a potential QEMU crash introduced by commit 3b54254966
.
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
6cc09e261b
commit
dde35bc966
@ -309,10 +309,9 @@ static void spapr_cpu_core_realize(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
err:
|
||||
while (i >= 0) {
|
||||
while (--i >= 0) {
|
||||
obj = sc->threads + i * size;
|
||||
object_unparent(obj);
|
||||
i--;
|
||||
}
|
||||
g_free(sc->threads);
|
||||
error_propagate(errp, local_err);
|
||||
|
Loading…
Reference in New Issue
Block a user