Re: [PATCH 1/2] xenconfig: Properly check retval of virDomainGraphicsListenSetAddress

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

 



On 10.02.2016 12:50, John Ferlan wrote:
> 
> 
> On 02/10/2016 06:37 AM, Erik Skultety wrote:
>> On 10/02/16 12:02, John Ferlan wrote:
>>>
>>>
>>> On 02/10/2016 05:37 AM, Michal Privoznik wrote:
>>>> The function, like others in our code, returns zero on success
>>>> and a negative value on error. However, there are two places in
>>>> xenconfig source code where we check for non-zero value. While
>>>> the function can't currently return a positive value, those
>>>> checks look okay, but does not really follow our style.
>>>>
>>>> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
>>>> ---
>>>>  src/xenconfig/xen_sxpr.c | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>
>>> I have patches on list which are similar, but I've been requested to
>>> change.  In particular, this change leads to a memory leak. as the vnc
>>> needs to be deleted.
>>>
>>> John
>>
>> Hmm, I can't see any memory leak caused by this particular patch, could
>> you please point it out for me? The only thing that could possibly leak
>> by an error within virDomainGraphicsListenAddress, is graphics and that
>> pointer is properly freed at the end.
>>
>> Erik
>>
> 
> Michal asked me via IRC - the code looked eerily similar to the
> qemu_command code I had posted patches on which also has the same non
> status check.  Should have more coffee in my system before diving in ;-)
> 
> John

Okay, since we have a clear consensus here, I've pushed this one now.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]