[PATCH 3/5] testUSBList: don't leak @dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



==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@xxxxxxxxxx>
---
 tests/virusbtest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/virusbtest.c b/tests/virusbtest.c
index 4bbfe4af9..7cddb89af 100644
--- a/tests/virusbtest.c
+++ b/tests/virusbtest.c
@@ -217,6 +217,7 @@ testUSBList(const void *opaque ATTRIBUTE_UNUSED)
     }
 
     virUSBDeviceListDel(list, dev);
+    virUSBDeviceFree(dev);
     dev = NULL;
 
     if (testCheckNdevs("After deleting one",
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux