Skip to content
Snippets Groups Projects
Commit 70b0bc4c authored by Michal Luczaj's avatar Michal Luczaj Committed by Sean Christopherson
Browse files

KVM: Don't kfree(NULL) on kzalloc() failure in kvm_assign_ioeventfd_idx()


On kzalloc() failure, taking the `goto fail` path leads to kfree(NULL).
Such no-op has no use. Move it out.

Signed-off-by: default avatarMichal Luczaj <mhal@rbox.co>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20230327175457.735903-1-mhal@rbox.co


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent c9d60154
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment