[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V4 5/5] migration: simplify exec migration functions
From: |
Steven Sistare |
Subject: |
Re: [PATCH V4 5/5] migration: simplify exec migration functions |
Date: |
Wed, 21 Feb 2024 12:01:57 -0500 |
User-agent: |
Mozilla Thunderbird |
On 2/21/2024 10:54 AM, Fabiano Rosas wrote:
> Fabiano Rosas <farosas@suse.de> writes:
>
>> Steve Sistare <steven.sistare@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.sistare@oracle.com>
>>
>> Reviewed-by: Fabiano Rosas <farosas@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