mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
[ Upstream commit b4cf5fc01ce83e5c0bcf3dbb9f929428646b9098 ]
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:
committed by
Greg Kroah-Hartman
parent
ead2ad1d9f
commit
802293e2c4
@@ -1998,8 +1998,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);
|
||||||
|
|||||||
Reference in New Issue
Block a user