diff options
Diffstat (limited to 'arch/mips/kvm/mips.c')
-rw-r--r-- | arch/mips/kvm/mips.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 49ff3bfc007e..b9b803facdbf 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -279,7 +279,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) | |||
279 | 279 | ||
280 | if (!gebase) { | 280 | if (!gebase) { |
281 | err = -ENOMEM; | 281 | err = -ENOMEM; |
282 | goto out_free_cpu; | 282 | goto out_uninit_cpu; |
283 | } | 283 | } |
284 | kvm_debug("Allocated %d bytes for KVM Exception Handlers @ %p\n", | 284 | kvm_debug("Allocated %d bytes for KVM Exception Handlers @ %p\n", |
285 | ALIGN(size, PAGE_SIZE), gebase); | 285 | ALIGN(size, PAGE_SIZE), gebase); |
@@ -343,6 +343,9 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) | |||
343 | out_free_gebase: | 343 | out_free_gebase: |
344 | kfree(gebase); | 344 | kfree(gebase); |
345 | 345 | ||
346 | out_uninit_cpu: | ||
347 | kvm_vcpu_uninit(vcpu); | ||
348 | |||
346 | out_free_cpu: | 349 | out_free_cpu: |
347 | kfree(vcpu); | 350 | kfree(vcpu); |
348 | 351 | ||