On 2/21/2024 10:54 AM, Fabiano Rosas wrote: > Fabiano Rosas <faro...@suse.de> writes: > >> Steve Sistare <steven.sist...@oracle.com> writes: >> >>> Simplify the exec migration code by using list utility functions. >>> >>> As a side effect, this also fixes a minor memory leak. On function return, >>> "g_auto(GStrv) argv" frees argv and each element, which is wrong, because >>> the function does not own the individual elements. To compensate, the code >>> uses g_steal_pointer which NULLs argv and prevents the destructor from >>> running, but argv is leaked. >>> >>> Fixes: cbab4face57b ("migration: convert exec backend ...") >>> Signed-off-by: Steve Sistare <steven.sist...@oracle.com> >> >> Reviewed-by: Fabiano Rosas <faro...@suse.de> > > You'll have to reintroduce the qemu/cutils.h include: > > ../migration/exec.c: In function 'exec_get_cmd_path': > ../migration/exec.c:37:5: error: implicit declaration of function 'pstrcat'; > did you mean 'strcat'? [-Werror=implicit-function-declaration] > 37 | pstrcat(detected_path, MAX_PATH, "\\cmd.exe"); > | ^~~~~~~ > | strcat > ../migration/exec.c:37:5: error: nested extern declaration of 'pstrcat' > [-Werror=nested-externs]
Thanks, I will rebase to the tip and verify all is well before I post V5. - Steve