Re: [Qemu-devel] [PATCH 2/5] spapr_cpu_core: fix potential leak in spapr_cpu_core_realize()

2018-06-14 Thread David Gibson
On Thu, Jun 14, 2018 at 11:50:27PM +0200, Greg Kurz wrote: > Commit 94ad93bd97684 (QEMU 2.12) switched to instantiate CPUs separately > but it missed to adapt the error path accordingly. If something fails in > the CPU creation loop, then the CPU object that was just created is leaked. > > The

[Qemu-devel] [PATCH 2/5] spapr_cpu_core: fix potential leak in spapr_cpu_core_realize()

2018-06-14 Thread Greg Kurz
Commit 94ad93bd97684 (QEMU 2.12) switched to instantiate CPUs separately but it missed to adapt the error path accordingly. If something fails in the CPU creation loop, then the CPU object that was just created is leaked. The error paths in this function are a bit obfuscated, and adding yet