libxl: fix attaching net device of type hostdev
libxl: fix attaching net device of type hostdev

Chunyan sent a correct patch to fix a resource leak on error in
libxlDomainAttachNetDevice

https://www.redhat.com/archives/libvir-list/2016-March/msg00924.html

I made what was thought to be an improvement and pushed the patch as
commit e6336442. As it turns out, my change broke adding net devices
that are actually hostdevs to the list of nets in virDomainDef. This
patch changes e6336442 to resemble Chunyan's original, correct
patch.

jfehlig/libvirt,taget/libvirt,jardasgit/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,crobinso/libvirt,libvirt/libvirt,andreabolognani/libvirt,jfehlig/libvirt,andreabolognani/libvirt,jardasgit/libvirt,nertpinx/libvirt,eskultety/libvirt,libvirt/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,eskultety/libvirt,nertpinx/libvirt,jfehlig/libvirt,zippy2/libvirt,fabianfreyer/libvirt,datto/libvirt,jfehlig/libvirt,datto/libvirt,datto/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,eskultety/libvirt,datto/libvirt,libvirt/libvirt,taget/libvirt,VenkatDatta/libvirt,eskultety/libvirt,crobinso/libvirt,datto/libvirt,VenkatDatta/libvirt,eskultety/libvirt,zippy2/libvirt,olafhering/libvirt,jardasgit/libvirt,zippy2/libvirt,olafhering/libvirt,jardasgit/libvirt,crobinso/libvirt,fabianfreyer/libvirt,taget/libvirt,olafhering/libvirt,andreabolognani/libvirt,crobinso/libvirt,olafhering/libvirt,taget/libvirt,libvirt/libvirt,zippy2/libvirt,nertpinx/libvirt,taget/libvirt,jardasgit/libvirt