mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
hw/ppc/pnv: Avoid dynamic stack allocation
Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-id: 20220819153931.3147384-7-peter.maydell@linaro.org
This commit is contained in:
parent
c140a69055
commit
a580fdcd60
3 changed files with 7 additions and 7 deletions
|
@ -397,7 +397,7 @@ void spapr_phb_nvgpu_populate_pcidev_dt(PCIDevice *dev, void *fdt, int offset,
|
|||
continue;
|
||||
}
|
||||
if (dev == nvslot->gpdev) {
|
||||
uint32_t npus[nvslot->linknum];
|
||||
g_autofree uint32_t *npus = g_new(uint32_t, nvslot->linknum);
|
||||
|
||||
for (j = 0; j < nvslot->linknum; ++j) {
|
||||
PCIDevice *npdev = nvslot->links[j].npdev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue