Re: [libvirt] [PATCH] Plug leak in virCgroupMoveTask

2013-06-26 Thread Ján Tomko
On 06/26/2013 03:15 PM, Peter Krempa wrote: > On 06/26/13 15:09, Ján Tomko wrote: >> We only break out of the while loop if *content is an empty string. >> However the buffer has been allocated to BUFSIZ + 1 (8193 in my case), >> but it gets overwritten in the next for iteration. >> >> Move VIR_FRE

Re: [libvirt] [PATCH] Plug leak in virCgroupMoveTask

2013-06-26 Thread Peter Krempa
On 06/26/13 15:09, Ján Tomko wrote: We only break out of the while loop if *content is an empty string. However the buffer has been allocated to BUFSIZ + 1 (8193 in my case), but it gets overwritten in the next for iteration. Move VIR_FREE right before we overwrite it to avoid the leak. ==5777=

[libvirt] [PATCH] Plug leak in virCgroupMoveTask

2013-06-26 Thread Ján Tomko
We only break out of the while loop if *content is an empty string. However the buffer has been allocated to BUFSIZ + 1 (8193 in my case), but it gets overwritten in the next for iteration. Move VIR_FREE right before we overwrite it to avoid the leak. ==5777== 16,386 bytes in 2 blocks are definit