mirror of https://gitee.com/openkylin/libvirt.git
pci: Initialize return location in virPCIGetPhysicalFunction()
Just an extra precaution in case the function returns early due to an OOM error.
This commit is contained in:
parent
72a7ff6b50
commit
12b28f1bf8
|
@ -2487,6 +2487,8 @@ virPCIGetPhysicalFunction(const char *vf_sysfs_path,
|
|||
{
|
||||
char *device_link = NULL;
|
||||
|
||||
*pf = NULL;
|
||||
|
||||
if (virBuildPath(&device_link, vf_sysfs_path, "physfn") == -1) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue