]> xenbits.xensource.com Git - libvirt.git/commit
node_device_conf: Don't leak @physical_function in virNodeDeviceGetPCISRIOVCaps
authorJiang Kun <jiang.kun2@zte.com.cn>
Thu, 12 Sep 2019 08:05:39 +0000 (16:05 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Sep 2019 14:17:35 +0000 (16:17 +0200)
commit38816336a5026623d0a49988c6681b1323c79f09
treeaa0037db9b754a9e2f9779e937d97e36d59b8c6c
parent4b3ab5d2135a0dccd654491ef3a4f5b71575deae
node_device_conf: Don't leak @physical_function in virNodeDeviceGetPCISRIOVCaps

The pci_dev->physical_function is rewritten in
virPCIGetPhysicalFunction() to a newly allocated pointer.
Therefore, we must free the old one to avoid memleak.

Signed-off-by: Jiang kun <jiang.kun2@zte.com.cn>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/node_device_conf.c