Re: [PATCH next] kvm: debugfs: fix memory leak in kvm_create_vm_debugfs

From: Paolo Bonzini
Date: Thu Jul 08 2021 - 12:59:03 EST


On 01/07/21 23:24, Jing Zhang wrote:
In commit bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors")
loop for filling debugfs_stat_data was copy-pasted 2 times, but
in the second loop pointers are saved over pointers allocated
in the first loop. It causes memory leak. Fix it.

Fixes: bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors")
Signed-off-by: Pavel Skripkin<paskripkin@xxxxxxxxx>
---

Queued, thanks.

Paolo