qemu_command: Fix memleak in qemuBuildFloppyCommandLineControllerOptions
There are some path where the buffer is not passed to virCommandAddArgBuffer and therefore the buffer might leak. ==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 0x5D39E82: virReallocN (viralloc.c:245) ==191201== by 0x5D3E8F2: virBufferGrow (virbuffer.c:150) ==191201== by 0x5D3E9C8: virBufferAdd (virbuffer.c:185) ==191201== by 0x56EAC98: qemuBuildFloppyCommandLineControllerOptions (qemu_command.c:2162) ==191201== by 0x56EB3E1: qemuBuildDisksCommandLine (qemu_command.c:2370) ==191201== by 0x570055E: qemuBuildCommandLine (qemu_command.c:10315) ==191201== by 0x575EA7F: qemuProcessCreatePretendCmd (qemu_process.c:6777) ==191201== by 0x113DAB: testCompareXMLToArgv (qemuxml2argvtest.c:598) ==191201== by 0x13A75B: virTestRun (testutils.c:180) ==191201== by 0x138BE8: mymain (qemuxml2argvtest.c:2975) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
Showing
想要评论请 注册 或 登录