]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virpci: Fix memleak in virPCIDeviceIterDevices
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 23 Jan 2019 15:32:59 +0000 (16:32 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Jan 2019 09:11:27 +0000 (10:11 +0100)
commitf2476cac74bd46c51fe3500a45a37eee7f968992
tree10d34946ef7554e7ffd449107c6b80380a6ae752
parent6a8c1749029202539174c83aa7575af443c7fb22
virpci: Fix memleak in virPCIDeviceIterDevices

This partially reverts 00dc991ca167302c7a72f4fb16be061d05b12a32.

 2,030 (1,456 direct, 574 indirect) bytes in 14 blocks are definitely lost in loss record 77 of 80
    at 0x4C30E96: calloc (vg_replace_malloc.c:711)
    by 0x50F83AA: virAlloc (viralloc.c:143)
    by 0x5178DFA: virPCIDeviceNew (virpci.c:1753)
    by 0x51753E9: virPCIDeviceIterDevices (virpci.c:468)
    by 0x5175EB5: virPCIDeviceGetParent (virpci.c:759)
    by 0x517AB55: virPCIDeviceIsBehindSwitchLackingACS (virpci.c:2476)
    by 0x517AC24: virPCIDeviceIsAssignable (virpci.c:2494)
    by 0x10BF27: testVirPCIDeviceIsAssignable (virpcitest.c:229)
    by 0x10D14C: virTestRun (testutils.c:174)
    by 0x10C535: mymain (virpcitest.c:422)
    by 0x10F1B6: virTestMain (testutils.c:1112)
    by 0x10CF93: main (virpcitest.c:455)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/util/virpci.c