Re: [PATCH] leaseshelper: avoid mem leak after storing lease entries

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

 



On 07/23/2014 04:05 PM, Nehal J Wani wrote:
> Contents of existing lease file were being stored in a variable
> which was never freed.
> 
> ---
>  src/network/leaseshelper.c | 1 +
>  1 file changed, 1 insertion(+)

ACK and pushed.

> 
> diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
> index e4b5283..c8543a2 100644
> --- a/src/network/leaseshelper.c
> +++ b/src/network/leaseshelper.c
> @@ -361,6 +361,7 @@ main(int argc, char **argv)
>  
>      VIR_FREE(pid_file);
>      VIR_FREE(exptime);
> +    VIR_FREE(lease_entries);
>      VIR_FREE(custom_lease_file);
>      virJSONValueFree(lease_new);
>      virJSONValueFree(leases_array);
> 

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