mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
testUSBList: don't leak @dev
==22187== 77 (56 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 37 ==22187== at 0x4C2BC75: calloc (vg_replace_malloc.c:624) ==22187== by 0x4E75685: virAlloc (viralloc.c:144) ==22187== by 0x4F0613A: virUSBDeviceNew (virusb.c:332) ==22187== by 0x4F05BA2: virUSBDeviceSearch (virusb.c:183) ==22187== by 0x4F05F95: virUSBDeviceFind (virusb.c:296) ==22187== by 0x403514: testUSBList (virusbtest.c:209) ==22187== by 0x403BD8: virTestRun (testutils.c:180) ==22187== by 0x4039E5: mymain (virusbtest.c:285) ==22187== by 0x4056BC: virTestMain (testutils.c:992) ==22187== by 0x403A4A: main (virusbtest.c:293) Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
eb58732c01
commit
afecfc2bf4
@ -217,6 +217,7 @@ testUSBList(const void *opaque ATTRIBUTE_UNUSED)
|
|||||||
}
|
}
|
||||||
|
|
||||||
virUSBDeviceListDel(list, dev);
|
virUSBDeviceListDel(list, dev);
|
||||||
|
virUSBDeviceFree(dev);
|
||||||
dev = NULL;
|
dev = NULL;
|
||||||
|
|
||||||
if (testCheckNdevs("After deleting one",
|
if (testCheckNdevs("After deleting one",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user