libxl: fix AttachDeviceConfig on hostdev type
libxl: fix AttachDeviceConfig on hostdev type

After attach-device a <hostdev> with --config, new device doesn't
show up in dumpxml and in guest.

To fix that, set dev->data.hostdev = NULL after work so that the
pointer is not freed, since vmdef has the pointer and still need it.

Signed-off-by: Chunyan Liu <699809cfcad49bea8cea68d656dfc4a832feaf7a@suse.com>

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