summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPavel Fedin <p.fedin@samsung.com>2015-10-06 11:14:35 +0300
committerChristoffer Dall <christoffer.dall@linaro.org>2015-10-20 18:04:48 +0200
commit399ea0f6bcd318af94ec8e4ffe96703ed674f22e (patch)
tree070990cf14677881d7c6573f53280f985774ac26 /arch
parent437f9963bc4fd75889c1fe9289a92dea9124a439 (diff)
downloadlinux-399ea0f6bcd318af94ec8e4ffe96703ed674f22e.tar.bz2
KVM: arm/arm64: Fix memory leak if timer initialization fails
Jump to correct label and free kvm_host_cpu_state Reviewed-by: Wei Huang <wei@redhat.com> Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kvm/arm.c2
1 files changed, 1 insertions, 1 deletions
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();