[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] network: Resolve some issues around vlan copying



On 01/17/2013 11:05 AM, John Ferlan wrote:
> On 01/16/2013 12:55 PM, Laine Stump wrote:
>> From: John Ferlan <jferlan redhat com>
>>
>> Remove extraneous check for 'netdef' when dereferencing for vlan.nTags.
>> Prior code would already check if netdef was NULL.
>>
>> Coverity complained about a path where the 'vlan' was potentially valid,
>> but a prior checks may not have allocated 'iface->data.network.actual',
>> so like other paths it needs to be allocated on the fly.
>>
>> Move the copying of vlan up earlier in networkAllocateActualDevice, so
>> that actual.type gets properly set.
>>
>> Since the first assignment to vlan is redundant except in the case of
>> jumping immediately to validate from the start of the function,
>> eliminate its initial setting at the top of the function in favor of
>> calling the helper function virDomainNetGetActualVlan() (which doesn't
>> depend on the local vlan pointer being initialized) down at validate:
>>
>> ---
>>
>> Difference's between John's V1 and this V2 are described in paragraphs
>> 2 and 3 above. I moved the lines that John changed, but left his
>> changes intact.
>>
>>  src/network/bridge_driver.c | 37 ++++++++++++++++++++-----------------
>>  1 file changed, 20 insertions(+), 17 deletions(-)
>>
> ACK
>
> The change removes the Coverity warning.

Pushed. Thanks!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]