Commit 399ea0f6 authored by Pavel Fedin's avatar Pavel Fedin Committed by Christoffer Dall

KVM: arm/arm64: Fix memory leak if timer initialization fails

Jump to correct label and free kvm_host_cpu_state
Reviewed-by: default avatarWei Huang <wei@redhat.com>
Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent 437f9963
...@@ -1080,7 +1080,7 @@ static int init_hyp_mode(void) ...@@ -1080,7 +1080,7 @@ static int init_hyp_mode(void)
*/ */
err = kvm_timer_hyp_init(); err = kvm_timer_hyp_init();
if (err) if (err)
goto out_free_mappings; goto out_free_context;
#ifndef CONFIG_HOTPLUG_CPU #ifndef CONFIG_HOTPLUG_CPU
free_boot_hyp_pgd(); free_boot_hyp_pgd();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment