Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4001bd3 authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman
Browse files

powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()



[ Upstream commit b4cf5fc01ce83e5c0bcf3dbb9f929428646b9098 ]

missing fdput() on one of the failure exits

Fixes: eacc56bb # v5.2
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0abe35bc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1950,8 +1950,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);