Resolve valgrind errors for nodedev cap parsing
Resolve valgrind errors for nodedev cap parsing

There were two errors, one as a direct result of commit id '8807b285'
and the other from cut-n-paste

TEST: nodedevxml2xmltest
      ..............                           14  OK
==25735== 3 bytes in 1 blocks are definitely lost in loss record 1 of 24
==25735==    at 0x4A0887C: malloc (vg_replace_malloc.c:270)
==25735==    by 0x344D2AF275: xmlStrndup (in /usr/lib64/libxml2.so.2.9.1)
==25735==    by 0x4D0C767: virNodeDeviceDefParseNode (node_device_conf.c:997)
==25735==    by 0x4D0D3D2: virNodeDeviceDefParse (node_device_conf.c:1337)
==25735==    by 0x401CA4: testCompareXMLToXMLHelper (nodedevxml2xmltest.c:28)
==25735==    by 0x402B2F: virtTestRun (testutils.c:158)
==25735==    by 0x401B27: mymain (nodedevxml2xmltest.c:81)
==25735==    by 0x40316A: virtTestMain (testutils.c:722)
==25735==    by 0x37C1021A04: (below main) (libc-start.c:225)
==25735==
==25735== 16 bytes in 1 blocks are definitely lost in loss record 10 of 24
==25735==    at 0x4A08A6E: realloc (vg_replace_malloc.c:662)
==25735==    by 0x4C7385E: virReallocN (viralloc.c:184)
==25735==    by 0x4C73906: virExpandN (viralloc.c:214)
==25735==    by 0x4C73B4A: virInsertElementsN (viralloc.c:324)
==25735==    by 0x4D0C84C: virNodeDeviceDefParseNode (node_device_conf.c:1026)
==25735==    by 0x4D0D3D2: virNodeDeviceDefParse (node_device_conf.c:1337)
==25735==    by 0x401CA4: testCompareXMLToXMLHelper (nodedevxml2xmltest.c:28)
==25735==    by 0x402B2F: virtTestRun (testutils.c:158)
==25735==    by 0x401B27: mymain (nodedevxml2xmltest.c:81)
==25735==    by 0x40316A: virtTestMain (testutils.c:722)
==25735==    by 0x37C1021A04: (below main) (libc-start.c:225)
==25735==
PASS: nodedevxml2xmltest

The first error was resolved by adding a missing VIR_FREE(numberStr); in
the new function virNodeDevCapPciDevIommuGroupParseXML().

The second error was a bit more opaque as the error was a result of copying
the free methodolgy of the existing code in virNodeDevCapsDefFree(). The code
would free each of the entries in the array, but not the memory for the
array itself.  Added the necessary VIR_FREE(data->pci_dev.iommuGroupDevices)
and while at it added the missing VIR_FREE(data->pci_dev.virtual_functions)
although there wasn't a test that tripped across it (thus it's been lurking
since commit id 'a010165d').

zippy2/libvirt,shugaoye/libvirt,eskultety/libvirt,datto/libvirt,agx/libvirt,elmarco/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,cbosdo/libvirt,agx/libvirt,jardasgit/libvirt,libvirt/libvirt,crobinso/libvirt,libvirt/libvirt,agx/libvirt,jfehlig/libvirt,elmarco/libvirt,olafhering/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,cbosdo/libvirt,crobinso/libvirt,elmarco/libvirt,jardasgit/libvirt,datto/libvirt,olafhering/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,agx/libvirt,shugaoye/libvirt,taget/libvirt,zippy2/libvirt,crobinso/libvirt,taget/libvirt,jfehlig/libvirt,shugaoye/libvirt,nertpinx/libvirt,nertpinx/libvirt,cbosdo/libvirt,cbosdo/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,elmarco/libvirt,nertpinx/libvirt,shugaoye/libvirt,jfehlig/libvirt,taget/libvirt,datto/libvirt,elmarco/libvirt,taget/libvirt,fabianfreyer/libvirt,libvirt/libvirt,zhlcindy/libvirt-1.1.4-maintain,zippy2/libvirt,VenkatDatta/libvirt,olafhering/libvirt,eskultety/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,crobinso/libvirt,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,eskultety/libvirt,fabianfreyer/libvirt,libvirt/libvirt,taget/libvirt,fabianfreyer/libvirt,zippy2/libvirt,rlaager/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,datto/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,datto/libvirt,nertpinx/libvirt,olafhering/libvirt,eskultety/libvirt,rlaager/libvirt,andreabolognani/libvirt,rlaager/libvirt,shugaoye/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,rlaager/libvirt,eskultety/libvirt,andreabolognani/libvirt,agx/libvirt,jardasgit/libvirt