remote: Fix a segfault in remoteDomainCreateWithFlags
remote: Fix a segfault in remoteDomainCreateWithFlags

Valgrind defects memory error:

==16759== 1 errors in context 1 of 8:
==16759== Invalid free() / delete / delete[] / realloc()
==16759==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16759==    by 0x83CD329: xdr_string (in /usr/lib64/libc-2.17.so)
==16759==    by 0x4D93E4D: xdr_remote_nonnull_string (remote_protocol.c:31)
==16759==    by 0x4D94350: xdr_remote_nonnull_domain (remote_protocol.c:58)
==16759==    by 0x4D976C8: xdr_remote_domain_create_with_flags_ret (remote_protocol.c:1762)
==16759==    by 0x83CC734: xdr_free (in /usr/lib64/libc-2.17.so)
==16759==    by 0x4D7F1E0: remoteDomainCreateWithFlags (remote_driver.c:2441)
==16759==    by 0x4D4BF17: virDomainCreateWithFlags (libvirt.c:9499)
==16759==    by 0x13127A: cmdStart (virsh-domain.c:3376)
==16759==    by 0x12BF83: vshCommandRun (virsh.c:1751)
==16759==    by 0x126FFB: main (virsh.c:3205)
==16759==  Address 0xe1394a0 is not stack'd, malloc'd or (recently) free'd

==16759== 1 errors in context 2 of 8:
==16759== Conditional jump or move depends on uninitialised value(s)
==16759==    at 0x4A07477: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16759==    by 0x83CD329: xdr_string (in /usr/lib64/libc-2.17.so)
==16759==    by 0x4D93E4D: xdr_remote_nonnull_string (remote_protocol.c:31)
==16759==    by 0x4D94350: xdr_remote_nonnull_domain (remote_protocol.c:58)
==16759==    by 0x4D976C8: xdr_remote_domain_create_with_flags_ret (remote_protocol.c:1762)
==16759==    by 0x83CC734: xdr_free (in /usr/lib64/libc-2.17.so)
==16759==    by 0x4D7F1E0: remoteDomainCreateWithFlags (remote_driver.c:2441)
==16759==    by 0x4D4BF17: virDomainCreateWithFlags (libvirt.c:9499)
==16759==    by 0x13127A: cmdStart (virsh-domain.c:3376)
==16759==    by 0x12BF83: vshCommandRun (virsh.c:1751)
==16759==    by 0x126FFB: main (virsh.c:3205)
==16759==  Uninitialised value was created by a stack allocation
==16759==    at 0x4D7F120: remoteDomainCreateWithFlags (remote_driver.c:2423)

How to reproduce?

# virsh start <domain> --paused

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

Signed-off-by: Alex Jia <e236faec8cb8371bfb245ba3769a84afc9a11438@redhat.com>

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