KVM: s390: Fix possible memory leak in SIGP functions
authorThomas Huth <thuth@linux.vnet.ibm.com>
Thu, 20 Mar 2014 12:20:46 +0000 (13:20 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 25 Mar 2014 12:27:11 +0000 (13:27 +0100)
When kvm_get_vcpu() returned NULL for the destination CPU in
__sigp_emergency() or __sigp_external_call(), the memory for the
"inti" structure was not released anymore. This patch fixes this
issue by moving the check for !dst_vcpu before the kzalloc() call.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/sigp.c

Simple merge