[libvirt] [PATCH] LXC: fix memory leak in lxcContainerMountFSBlockHelper

Osier Yang jyang at redhat.com
Mon Jun 18 13:29:04 UTC 2012


On 2012年06月12日 14:41, Osier Yang wrote:
> On 2012年06月12日 13:55, Gao feng wrote:
>> we alloc the memory for format in lxcContainerMountDetectFilesystem
>> but without free it in lxcContainerMountFSBlockHelper.
>>
>> this patch just call VIR_FREE to free it.
>>
>> Signed-off-by: Gao feng<gaofeng at cn.fujitsu.com>
>> ---
>> src/lxc/lxc_container.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
>> index 297bd6d..5651255 100644
>> --- a/src/lxc/lxc_container.c
>> +++ b/src/lxc/lxc_container.c
>> @@ -1014,6 +1014,7 @@ static int
>> lxcContainerMountFSBlockHelper(virDomainFSDefPtr fs,
>> }
>>
>> cleanup:
>> + VIR_FREE(format);
>> return ret;
>> }
>>
>
> ACK

Pushed.




More information about the libvir-list mailing list