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

Re: [libvirt] [PATCH] virDomainNetDefParseXML: avoid leak upon multiple "filterref"



On 05/18/2010 02:22 AM, Jim Meyering wrote:
> * src/conf/domain_conf.c (virDomainNetDefParseXML): Don't leak
> memory when parsing two or more "filterref" elements.
> ---
>  src/conf/domain_conf.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 3e45f79..0c717f2 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -1905,6 +1905,7 @@ virDomainNetDefParseXML(virCapsPtr caps,
>                  model = virXMLPropString(cur, "type");
>              } else if (xmlStrEqual (cur->name, BAD_CAST "filterref")) {
>                  filter = virXMLPropString(cur, "filter");
> +                free(filterparams);
>                  filterparams = virNWFilterParseParamAttributes(cur);

ACK.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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