mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 12:25:18 +02:00
powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
[ Upstream commitb4cf5fc01c
] missing fdput() on one of the failure exits Fixes:eacc56bb9d
# v5.2 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6c920754f6
commit
4f79a18af9
|
@ -1990,8 +1990,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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user