]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemucaps2xmltest: Don't leak @binary
authorMichal Privoznik <mprivozn@redhat.com>
Sat, 20 Apr 2019 05:00:14 +0000 (07:00 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 20 Apr 2019 05:48:42 +0000 (07:48 +0200)
commit8bf7cc5fac6cf09208e38b2df6f2818a54019b46
treef5507866e1442dc82f465697e945faf40b2555cd
parent918e8d68676592f824afebb94132ee96087f7c66
qemucaps2xmltest: Don't leak @binary

There's no need to keep @binary around.
virQEMUCapsInitGuestFromBinary() duplicates the string anyway.

 1,002 bytes in 36 blocks are definitely lost in loss record 54 of 59
    at 0x483579F: malloc (vg_replace_malloc.c:299)
    by 0x796B1C7: vasprintf (vasprintf.c:73)
    by 0x4C3F2C6: virVasprintfInternal (virstring.c:740)
    by 0x4C3F3DC: virAsprintfInternal (virstring.c:761)
    by 0x13AFC9: testGetCaps (qemucaps2xmltest.c:105)
    by 0x13B200: testQemuCapsXML (qemucaps2xmltest.c:157)
    by 0x13B642: virTestRun (testutils.c:174)
    by 0x13B366: doCapsTest (qemucaps2xmltest.c:191)
    by 0x13FF2B: testQemuCapsIterate (testutilsqemu.c:941)
    by 0x13B427: mymain (qemucaps2xmltest.c:215)
    by 0x13D706: virTestMain (testutils.c:1096)
    by 0x13B489: main (qemucaps2xmltest.c:221)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemucaps2xmltest.c