virsh: fix memleak when starting a guest with invalid fd
virsh: fix memleak when starting a guest with invalid fd

When start a guest with --pass-fd, if the argument of --pass-fd is invalid,
virsh will exit, but doesn't free the variable 'dom'.

The valgrind said:
...
==24569== 63 (56 direct, 7 indirect) bytes in 1 blocks are definitely lost in loss record 130 of 234
==24569==    at 0x4C2A1D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24569==    by 0x4E879A4: virAllocVar (viralloc.c:544)
==24569==    by 0x4EBD625: virObjectNew (virobject.c:190)
==24569==    by 0x4F3A18A: virGetDomain (datatypes.c:226)
==24569==    by 0x4F9311F: remoteDomainLookupByName (remote_driver.c:6636)
==24569==    by 0x4F44F20: virDomainLookupByName (libvirt.c:2277)
==24569==    by 0x12F616: vshCommandOptDomainBy (virsh-domain.c:105)
==24569==    by 0x131C79: cmdStart (virsh-domain.c:3330)
==24569==    by 0x12C4AB: vshCommandRun (virsh.c:1752)
==24569==    by 0x127001: main (virsh.c:3218)

https://bugzilla.redhat.com/show_bug.cgi?id=1067338

Signed-off-by: Jincheng Miao <8601f959b56f7ea8d391e3f9ac1778cb4d6b8380@redhat.com>
Signed-off-by: Eric Blake <a9da18479c871fe903d9590822cfe2629c6a4d11@redhat.com>

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