Re: [libvirt] [PATCH] qemu_command: Fix memleak in qemuBuildFloppyCommandLineControllerOptions

2018-08-16 Thread Erik Skultety
On Thu, Aug 16, 2018 at 12:22:24PM +0200, Michal Privoznik wrote: > Even though the buffer is passed to virCommand we still need to > free it. > > ==191201== 1,010 bytes in 1 blocks are definitely lost in loss record 826 of > 836 > ==191201==at 0x4C2CE3F: malloc (vg_replace_malloc.c:298) > ==1

Re: [libvirt] [PATCH] qemu_command: Fix memleak in qemuBuildFloppyCommandLineControllerOptions

2018-08-16 Thread Peter Krempa
On Thu, Aug 16, 2018 at 12:22:24 +0200, Michal Privoznik wrote: > Even though the buffer is passed to virCommand we still need to > free it. This is misleading. In fact we are NOT passing it to virCommandAddArgBuffer in some cases as it would be properly freed in that case. > ==191201== 1,010 byt

[libvirt] [PATCH] qemu_command: Fix memleak in qemuBuildFloppyCommandLineControllerOptions

2018-08-16 Thread Michal Privoznik
Even though the buffer is passed to virCommand we still need to free it. ==191201== 1,010 bytes in 1 blocks are definitely lost in loss record 826 of 836 ==191201==at 0x4C2CE3F: malloc (vg_replace_malloc.c:298) ==191201==by 0x4C2F1BF: realloc (vg_replace_malloc.c:785) ==191201==by 0x5D