Skip to contentSkip to conversation

KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages

PATCH New Alexander Graf 1 participant 1 message Oct 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 51/56 KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages

From: Scott Wood <[email protected]>

This was found by kmemleak.

---
 arch/powerpc/kvm/e500_tlb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/kvm/e500_tlb.c +2 -0
index a27d134..641f978 100644
@@ -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);
Signature · 1 line
1.6.0.2