Re: riscv: kvm: fix vector context allocation leak
From: Markus Elfring
Date: Mon Mar 16 2026 - 12:42:28 EST
>>> When the second kzalloc (host_context.vector.datap) fails in
>>> kvm_riscv_vcpu_alloc_vector_context, the first allocation
>>> (guest_context.vector.datap) is leaked. Free it before returning.
>> Were any source code analysis tools involved here?
>>
> No, there were found during manual review.
Would be looking for the support of advanced approaches
which would make such a “inspection” more convenient?
Regards,
Markus