libvirt/src/node_device
Eric Blake c6a4d268af nodedev: fix pci express memory leak
Leak introduced in commit 16ebf10f (v1.2.6), detected by valgrind:

==9816== 216 (96 direct, 120 indirect) bytes in 6 blocks are definitely lost in loss record 665 of 821
==9816==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==9816==    by 0x50836FB: virAlloc (viralloc.c:144)
==9816==    by 0x1DBDBE27: udevProcessPCI (node_device_udev.c:546)
==9816==    by 0x1DBDD79D: udevGetDeviceDetails (node_device_udev.c:1293)

* src/util/virpci.h (virPCIEDeviceInfoFree): New prototype.
* src/util/virpci.c (virPCIEDeviceInfoFree): New function.
* src/conf/node_device_conf.c (virNodeDevCapsDefFree): Clear
pci_express under pci case.
(virNodeDevCapPCIDevParseXML): Avoid leak.
* src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
* src/libvirt_private.syms (virpci.h): Export it.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-07-28 14:10:29 -06:00
..
node_device_driver.c node_device: Expose link state & speed 2014-06-11 10:59:39 +02:00
node_device_driver.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
node_device_hal.c node_device: HAL: Ignore return value of virStrToLong_ui 2014-07-21 16:32:53 +02:00
node_device_hal.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
node_device_linux_sysfs.c Add unique_id to nodedev output 2014-07-21 12:55:11 -04:00
node_device_udev.c nodedev: fix pci express memory leak 2014-07-28 14:10:29 -06:00
node_device_udev.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00