Re: [PATCH 1/5] domainsnapshotxml2xmltest: Clean up labels and use bool instead of int

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

 



On 12/04/2013 10:55 AM, Peter Krempa wrote:
> The 'internal' variable holds only two states; convert it to a boolean
> and the 'fail' label should be called 'cleanup'.
> ---
>  tests/domainsnapshotxml2xmltest.c | 36 ++++++++++++++++++++----------------
>  1 file changed, 20 insertions(+), 16 deletions(-)
> 

> @@ -95,8 +97,10 @@ mymain(void)
>      if ((driver.caps = testQemuCapsInit()) == NULL)
>          return EXIT_FAILURE;
> 
> -    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
> +    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver))) {
> +        virObjectUnref(driver.caps);
>          return EXIT_FAILURE;
> +    }

Is this a memory leak fix not mentioned in the commit message?  Fine to
include it, but mentioning it would be nice.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]