Commit b4cf5fc0 authored by Al Viro's avatar Al Viro

powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()

missing fdput() on one of the failure exits

Fixes: eacc56bb # v5.2
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 1613e604
...@@ -1984,8 +1984,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, ...@@ -1984,8 +1984,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
break; break;
r = -ENXIO; r = -ENXIO;
if (!xive_enabled()) if (!xive_enabled()) {
fdput(f);
break; break;
}
r = -EPERM; r = -EPERM;
dev = kvm_device_from_filp(f.file); dev = kvm_device_from_filp(f.file);
......
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