mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
missing fdput() on one of the failure exits
Fixes: eacc56bb9d # v5.2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
1613e604df
commit
b4cf5fc01c
|
|
@ -1984,8 +1984,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
|
|||
break;
|
||||
|
||||
r = -ENXIO;
|
||||
if (!xive_enabled())
|
||||
if (!xive_enabled()) {
|
||||
fdput(f);
|
||||
break;
|
||||
}
|
||||
|
||||
r = -EPERM;
|
||||
dev = kvm_device_from_filp(f.file);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user