Re: [PATCH v2] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Philippe Mathieu-Daudé via
On Mon, Sep 5, 2022 at 3:28 PM Paolo Bonzini wrote: > > Reported by Coverity as CID 1490142. Since the size is constant and the > lifetime is the same as the StatsDescriptors struct, embed the struct > directly instead of using a separate allocation. > > Suggested-by: Richard Henderson > Signed-

Re: [PATCH v2] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Richard Henderson
On 9/5/22 13:39, Paolo Bonzini wrote: Reported by Coverity as CID 1490142. Since the size is constant and the lifetime is the same as the StatsDescriptors struct, embed the struct directly instead of using a separate allocation. Suggested-by: Richard Henderson Signed-off-by: Paolo Bonzini ---

[PATCH v2] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Paolo Bonzini
Reported by Coverity as CID 1490142. Since the size is constant and the lifetime is the same as the StatsDescriptors struct, embed the struct directly instead of using a separate allocation. Suggested-by: Richard Henderson Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 9 - 1 f