KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Tue, 9 Mar 2010 05:55:19 +0000 (14:55 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:37 +0000 (07:41 -0700)
commit764a47273a858ebd62e560430af19aeed6abcb85
tree46a484725d884c96437b2d5239b60f37298e0107
parentf5a8ae1ee86c2699e5a693a0acb5e8f4daa00f8b
KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails

(Cherry-picked from commit b7af40433870aa0636932ad39b0c48a0cb319057)

svm_create_vcpu() does not free the pages allocated during the creation
when it fails to complete the allocations. This patch fixes it.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/svm.c