qemu: plug memory leak
Leak introduced in commit c1bc3d89. Detected by valgrind: ==18462== 1,100 bytes in 1 blocks are definitely lost in loss record 183 of 184 ==18462== at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==18462== by 0x4A06167: realloc (vg_replace_malloc.c:525) ==18462== by 0x4AADBB: virReallocN (memory.c:161) ==18462== by 0x4A975E: virBufferGrow (buf.c:117) ==18462== by 0x4A9D92: virBufferVasprintf (buf.c:290) ==18462== by 0x4A9EF7: virBufferAsprintf (buf.c:263) ==18462== by 0x429488: qemuBuildControllerDevStr (qemu_command.c:1993) ==18462== by 0x42C4B6: qemuBuildCommandLine (qemu_command.c:3803) ==18462== by 0x41A604: testCompareXMLToArgvHelper (qemuxml2argvtest.c:124) ==18462== by 0x41BB81: virtTestRun (testutils.c:141) ==18462== by 0x416DFF: mymain (qemuxml2argvtest.c:369) ==18462== by 0x41B277: virtTestMain (testutils.c:696) ==18462== ==18462== LEAK SUMMARY: ==18462== definitely lost: 1,100 bytes in 1 blocks ==18462== indirectly lost: 0 bytes in 0 blocks * src/qemu/qemu_command.c (qemuBuildCommandLine): Clean up on success. Signed-off-by: NAlex Jia <ajia@redhat.com>
Showing
想要评论请 注册 或 登录