[libvirt] [PATCH] qemu: Fix NULL pointer access in qemuProcessInitCpuAffinity()

John Ferlan jferlan at redhat.com
Thu Jun 6 14:46:52 UTC 2019



On 6/6/19 9:44 AM, Andrea Bolognani wrote:
> Commit 2f2254c7f4e5 attempted to fix a memory leak by ensuring
> cpumapToSet is always a freshly allocated bitmap, but regrettably
> introduced a NULL pointer access while doing so, because it called
> virBitmapCopy() without allocating the destination bitmap first.
> 
> Solve the issue by using virBitmapNewCopy() instead.
> 
> Reported-by: John Ferlan <jferlan at redhat.com>
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>  src/qemu/qemu_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: John Ferlan <jferlan at redhat.com>

Coverity is happy too ;-)

John




More information about the libvir-list mailing list