Re: [PATCHv3] Fix Memory Leak in virQEMUCapsInitGuestFromBinary()

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

 



On 03/27/2014 05:38 AM, Nehal J Wani wrote:
> While running qemucaps2xmltest, it was found that valgrind pointed out
> the following memory leaks:
> 

> +++ b/src/qemu/qemu_capabilities.c
> @@ -1996,10 +1996,12 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps,
>  
>      *nmachines = 0;

Oh, and I'm dropping this assignment, as it is dead because of...

>      *machines = NULL;
> -    if (VIR_ALLOC_N(*machines, qemuCaps->nmachineTypes) < 0)
> -        goto error;
>      *nmachines = qemuCaps->nmachineTypes;

...this assignment.

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