KVM: s390: fix guest fprs memory leak
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 22 Jan 2016 13:55:56 +0000 (14:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:08 +0000 (15:07 -0800)
commitaa5f10879d2d745b67a0b21c91d788d8ac6717fe
treef7e516741c7308120e2a7ac9f4d262dd037ec178
parentdb8bb76c6f9564e18d5dda4d89e4fc70dc83c3fd
KVM: s390: fix guest fprs memory leak

commit 9c7ebb613bffea2feef4ec562ba1dbcaa810942b upstream.

fprs is never freed, therefore resulting in a memory leak if
kvm_vcpu_init() fails or the vcpu is destroyed.

Fixes: 9977e886cbbc ("s390/kernel: lazy restore fpu registers")
Reported-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kvm/kvm-s390.c