Re: [PATCH] network_conf.c: Free xmlDoc after use

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

 



On 08.02.2013 15:52, John Ferlan wrote:
> On 02/08/2013 09:26 AM, Michal Privoznik wrote:
>> The virNetworkObjUpdateParseFile() function was not freeing the xml
>> variable, leaving us with a memory leak.
>> ---
>>  src/conf/network_conf.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
>> index c93916d..3604ff7 100644
>> --- a/src/conf/network_conf.c
>> +++ b/src/conf/network_conf.c
>> @@ -1895,6 +1895,7 @@ virNetworkObjUpdateParseFile(const char *filename,
>>      ret = 0;
>>  
>>  cleanup:
>> +    xmlFreeDoc(xml);
>>      xmlXPathFreeContext(ctxt);
>>      return ret;
>>  }
>>
> ACK
> 
> Neither Coverity or Valgrind picked this up!
> 
> John
> 

Thanks, pushed.

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]