From: Scott Wood Date: Wed, 22 Aug 2012 15:04:24 +0000 (+0000) Subject: KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages X-Git-Tag: next-20120926~30^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=79812b356d2ad363eba6e2fa0d7152027abef326;p=karo-tx-linux.git KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages This was found by kmemleak. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index a27d134eef36..641f97847b95 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -1134,6 +1134,8 @@ static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500) } vcpu_e500->num_shared_tlb_pages = 0; + + kfree(vcpu_e500->shared_tlb_pages); vcpu_e500->shared_tlb_pages = NULL; } else { kfree(vcpu_e500->gtlb_arch);