Skip to content
Commit 004d62eb authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Paolo Bonzini
Browse files

kvm: debugfs: fix memory leak in kvm_create_vm_debugfs

In commit bc9e9e67 ("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.  All this causes is a memory leak, fix it.

Fixes: bc9e9e67

 ("KVM: debugfs: Reuse binary stats descriptors")
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Reviewed-by: default avatarJing Zhang <jingzhangos@google.com>
Message-Id: <20210701195500.27097-1-paskripkin@gmail.com>
Reviewed-by: default avatarJing Zhang <jingzhangos@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7234c362
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment