From: Pavel Fedin
Date: Tue, 6 Oct 2015 08:14:35 +0000 (+0300)
Subject: KVM: arm/arm64: Fix memory leak if timer initialization fails
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=399ea0f6bcd318af94ec8e4ffe96703ed674f22e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git
KVM: arm/arm64: Fix memory leak if timer initialization fails
Jump to correct label and free kvm_host_cpu_state
Reviewed-by: Wei Huang
Signed-off-by: Pavel Fedin
Signed-off-by: Christoffer Dall
---
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index dc017adfddc8..78b286994577 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -1080,7 +1080,7 @@ static int init_hyp_mode(void)
*/
err = kvm_timer_hyp_init();
if (err)
- goto out_free_mappings;
+ goto out_free_context;
#ifndef CONFIG_HOTPLUG_CPU
free_boot_hyp_pgd();