Daniel P. Berrangé <berra...@redhat.com> writes:

>>  src/bhyve/bhyve_parse_command.c | 59 +++++++++++++++++++++++++++++++++
>>  1 file changed, 59 insertions(+)
>
> Should come with additions to  bhyveargv2xmltest.c data files

Done

>> +    if (!(hostdev = virDomainHostdevDefNew()))
>> +        return 0;
>
> This method can't fail so don't check for NULL.

Done

>> +    if (!(params = g_strsplit(addr, ":", -1))) {
>> +        virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to parse PCI 
>> address %1$s"), addr);
>> +        goto error;
>> +    }
>> +    if (g_str_equal(addr, *params))
>> +        if (!(params = g_strsplit(addr, "/", -1))) {
>
> This overwrites the pointer currently stored in 'params'
> without free'ing it. The 'g_auto' will only free data
> when it goes out of scope, not when the pointer is
> overwritten directly.

Done

>> +            virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to parse PCI 
>> address %1$s"), addr);
>> +            goto error;
>> +        }
>
> Add {} on the outer if too for clarity.

Done.

-- 
Alexander Shursha

Reply via email to