Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202354
b: refs/heads/master
c: a1a005f
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed Aug 1, 2010
1 parent 42a703b commit 2e70680
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d5993d63f2bac75b89e171a7098044ec4bc701f
refs/heads/master: a1a005f36e0defea7c5490772c318c6af2261d31
12 changes: 4 additions & 8 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -2437,6 +2437,8 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
void __user *argp = (void __user *)arg;
int r;
struct kvm_lapic_state *lapic = NULL;
struct kvm_xsave *xsave = NULL;
struct kvm_xcrs *xcrs = NULL;

switch (ioctl) {
case KVM_GET_LAPIC: {
Expand Down Expand Up @@ -2632,8 +2634,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
break;
}
case KVM_GET_XSAVE: {
struct kvm_xsave *xsave;

xsave = kzalloc(sizeof(struct kvm_xsave), GFP_KERNEL);
r = -ENOMEM;
if (!xsave)
Expand All @@ -2648,8 +2648,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
break;
}
case KVM_SET_XSAVE: {
struct kvm_xsave *xsave;

xsave = kzalloc(sizeof(struct kvm_xsave), GFP_KERNEL);
r = -ENOMEM;
if (!xsave)
Expand All @@ -2663,8 +2661,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
break;
}
case KVM_GET_XCRS: {
struct kvm_xcrs *xcrs;

xcrs = kzalloc(sizeof(struct kvm_xcrs), GFP_KERNEL);
r = -ENOMEM;
if (!xcrs)
Expand All @@ -2680,8 +2676,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
break;
}
case KVM_SET_XCRS: {
struct kvm_xcrs *xcrs;

xcrs = kzalloc(sizeof(struct kvm_xcrs), GFP_KERNEL);
r = -ENOMEM;
if (!xcrs)
Expand All @@ -2700,6 +2694,8 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
}
out:
kfree(lapic);
kfree(xsave);
kfree(xcrs);
return r;
}

Expand Down

0 comments on commit 2e70680

Please sign in to comment.