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:
Andrea Bolognani 2016-05-25 10:27:12 +02:00
parent 72a7ff6b50
commit 12b28f1bf8

View File

@ -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;