mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 03:52:02 +02:00
KVM: s390: Fix memory leak in guest debug handling
bp_data is freed only for the error case by kfree(bp_data).
Every successful KVM_SET_GUEST_DEBUG will leak bp_data.
Fixes: 27291e2165 ("KVM: s390: hardware support for guest debugging")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260805110455.7200-5-borntraeger@linux.ibm.com>
This commit is contained in:
parent
b239410c76
commit
121ea1de92
|
|
@ -267,6 +267,7 @@ int kvm_s390_import_bp_data(struct kvm_vcpu *vcpu,
|
|||
vcpu->arch.guestdbg.hw_bp_info = bp_info;
|
||||
vcpu->arch.guestdbg.nr_hw_wp = nr_wp;
|
||||
vcpu->arch.guestdbg.hw_wp_info = wp_info;
|
||||
kfree(bp_data);
|
||||
return 0;
|
||||
error:
|
||||
kfree(bp_data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user