Skip to content

Commit

Permalink
KVM: arm/arm64: Fix memory leak if timer initialization fails
Browse files Browse the repository at this point in the history
Jump to correct label and free kvm_host_cpu_state

Reviewed-by: Wei Huang <[email protected]>
Signed-off-by: Pavel Fedin <[email protected]>
Signed-off-by: Christoffer Dall <[email protected]>
  • Loading branch information
pfedin authored and chazy committed Oct 20, 2015
1 parent 437f996 commit 399ea0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kvm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 399ea0f

Please sign in to comment.