powerpc/pseries: fix potential memory leak in init_cpu_associativity()
authorWang Yufen <wangyufen@huawei.com>
Wed, 14 Dec 2022 07:46:23 +0000 (15:46 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Oct 2023 06:32:14 +0000 (17:32 +1100)
commit95f1a128cd728a7257d78e868f1f5a145fc43736
tree3fb5faf56cfd15af0bb129222255836429830d89
parent007240d59c11f87ac4f6cfc6a1d116630b6b634c
powerpc/pseries: fix potential memory leak in init_cpu_associativity()

If the vcpu_associativity alloc memory successfully but the
pcpu_associativity fails to alloc memory, the vcpu_associativity
memory leaks.

Fixes: d62c8deeb6e6 ("powerpc/pseries: Provide vcpu dispatch statistics")
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Reviewed-by: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/1671003983-10794-1-git-send-email-wangyufen@huawei.com
arch/powerpc/platforms/pseries/lpar.c