]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuxml2argvtest: Don't initialize qemuCaps twice
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 30 May 2018 15:51:59 +0000 (17:51 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 31 May 2018 09:33:45 +0000 (11:33 +0200)
commit879cff55ac9e4b18af39ab5ca8c4a70676030b63
tree0cfc83acda89e72de03ced58d526d621d40ccd08
parent5f18b9ba8dfa8b30f971c8f88015e06908082d06
qemuxml2argvtest: Don't initialize qemuCaps twice

There's no point in calling testInitQEMUCaps() (which sets
info.qemuCaps) only to overwrite (and leak) it on the very next
line.

==12962== 296 (208 direct, 88 indirect) bytes in 1 blocks are definitely lost in loss record 265 of 331
==12962==    at 0x4C2CF26: calloc (vg_replace_malloc.c:711)
==12962==    by 0x5D28D9F: virAllocVar (viralloc.c:560)
==12962==    by 0x5D96AB4: virObjectNew (virobject.c:239)
==12962==    by 0x56DB7C7: virQEMUCapsNew (qemu_capabilities.c:1480)
==12962==    by 0x112A5B: testInitQEMUCaps (qemuxml2argvtest.c:361)
==12962==    by 0x1371C8: mymain (qemuxml2argvtest.c:2871)
==12962==    by 0x13AD0B: virTestMain (testutils.c:1120)
==12962==    by 0x1372FD: main (qemuxml2argvtest.c:2883)

Removing the function call renders @gic argument unused therefore
it's removed from the macro (and all its callers).

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