Re: [PATCH] microvm: fix memory leak in microvm_fix_kernel_cmdline

2019-11-12 Thread Paolo Bonzini
On 12/11/19 17:34, Sergio Lopez wrote: > In microvm_fix_kernel_cmdline(), fw_cfg_modify_string() is duplicating > cmdline instead of taking ownership of it. Free it afterwards to avoid > leaking it. > > Reported-by: Coverity (CID 1407218) > Suggested-by: Peter Maydell > Signed-off-by: Sergio Lope

[PATCH] microvm: fix memory leak in microvm_fix_kernel_cmdline

2019-11-12 Thread Sergio Lopez
In microvm_fix_kernel_cmdline(), fw_cfg_modify_string() is duplicating cmdline instead of taking ownership of it. Free it afterwards to avoid leaking it. Reported-by: Coverity (CID 1407218) Suggested-by: Peter Maydell Signed-off-by: Sergio Lopez --- hw/i386/microvm.c | 2 ++ 1 file changed, 2 i