]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virnetdev: Need to initialize 'pciConfigAddr'
authorJohn Ferlan <jferlan@redhat.com>
Tue, 22 Jan 2013 14:15:41 +0000 (09:15 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Jan 2013 16:29:25 +0000 (17:29 +0100)
It was possible to call VIR_FREE in cleanup prior to initialization

src/util/virnetdev.c

index 7ffd3c225635b5655d59cda02c3b45d097f6f09b..295884f6535600d5f973cfebf369fe7f113676d5 100644 (file)
@@ -986,7 +986,7 @@ virNetDevGetVirtualFunctions(const char *pfname,
     int ret = -1, i;
     char *pf_sysfs_device_link = NULL;
     char *pci_sysfs_device_link = NULL;
-    char *pciConfigAddr;
+    char *pciConfigAddr = NULL;
 
     if (virNetDevSysfsFile(&pf_sysfs_device_link, pfname, "device") < 0)
         return ret;