xen_xm: Fix SIGSEGV in xenXMDomainDefineXML
xen_xm: Fix SIGSEGV in xenXMDomainDefineXML

On CentOS5 with xen-3.0.3:

 Program received signal SIGSEGV, Segmentation fault.
 virFree (ptrptr=0x8) at util/memory.c:310
 310         free(*(void**)ptrptr);
 (gdb) bt
 #0  virFree (ptrptr=0x8) at util/memory.c:310
 #1  0x00002aaaaae167c8 in xenXMDomainDefineXML (conn=0x694e80, xml=0x6b2ce0 "P\fk") at xen/xm_internal.c:1199
 #2  0x00002aaaaae070d7 in xenUnifiedDomainDefineXML (conn=0x8,
     xml=0x6ac040 "<domain type='xen'>\n  <name>pv</name>\n  <uuid>20291bc0-453a-4d6c-c6ac-4e5af63b932c</uuid>\n  <memory>1048576</memory>\n  <currentMemory>1048576</currentMemory>\n  <vcpu>1</vcpu>\n  <os>\n    <type arch='x8"...) at xen/xen_driver.c:1524
 #3  0x00002aaaaada7803 in virDomainDefineXML (conn=0x694e80,
     xml=0x6ac040 "<domain type='xen'>\n  <name>pv</name>\n  <uuid>20291bc0-453a-4d6c-c6ac-4e5af63b932c</uuid>\n  <memory>1048576</memory>\n  <currentMemory>1048576</currentMemory>\n  <vcpu>1</vcpu>\n  <os>\n    <type arch='x8"...) at libvirt.c:7823
 #4  0x0000000000426173 in cmdEdit (ctl=0x7fffffffb8e0, cmd=<value optimized out>) at virsh.c:14882
 #5  0x000000000041c9ce in vshCommandRun (ctl=0x7fffffffb8e0, cmd=0x658c50) at virsh.c:17712
 #6  0x000000000042c3b9 in main (argc=1, argv=<value optimized out>) at virsh.c:19317

Signed-off-by: Philipp Hahn <8cb7a2c205789112a9f61bc3102305826b6a8db1@univention.de>

libvirt/libvirt,jfehlig/libvirt,rmarwaha/libvirt1,agx/libvirt,datto/libvirt,bjzhang/libvirt,eskultety/libvirt,nertpinx/libvirt,jfehlig/libvirt,taget/libvirt,cbosdo/libvirt,agx/libvirt,warewolf/libvirt,rmarwaha/libvirt1,olafhering/libvirt,dumbbell/libvirt,jfehlig/libvirt,jeckersb/libvirt,wiedi/libvirt,novel/fbsd-libvirt,bjzhang/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,zhlcindy/libvirt-1.1.4-maintain,fabianfreyer/libvirt,jardasgit/libvirt,crobinso/libvirt,iam-TJ/libvirt,datto/libvirt,iam-TJ/libvirt,VenkatDatta/libvirt,trainstack/libvirt,novel/fbsd-libvirt,trainstack/libvirt,datto/libvirt,shugaoye/libvirt,warewolf/libvirt,emaste/libvirt,eskultety/libvirt,olafhering/libvirt,iam-TJ/libvirt,rmarwaha/libvirt,iam-TJ/libvirt,siboulet/libvirt-openvz,siboulet/libvirt-openvz,foomango/libvirt,wiedi/libvirt,andreabolognani/libvirt,siboulet/libvirt-openvz,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,datto/libvirt,trainstack/libvirt,fabianfreyer/libvirt,warewolf/libvirt,wiedi/libvirt,foomango/libvirt,trainstack/libvirt,wiedi/libvirt,elmarco/libvirt,foomango/libvirt,crobinso/libvirt,novel/fbsd-libvirt,warewolf/libvirt,jeckersb/libvirt,VenkatDatta/libvirt,rmarwaha/libvirt,iam-TJ/libvirt,novel/fbsd-libvirt,rmarwaha/libvirt,shugaoye/libvirt,danwent/libvirt-ovs,foomango/libvirt,wiedi/libvirt,zhlcindy/libvirt-1.1.4-maintain,zippy2/libvirt,dumbbell/libvirt,jardasgit/libvirt,jardasgit/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,eskultety/libvirt,taget/libvirt,rmarwaha/libvirt1,zhlcindy/libvirt-1.1.4-maintain,rlaager/libvirt,jeckersb/libvirt,warewolf/libvirt,bjzhang/libvirt,taget/libvirt,zhlcindy/libvirt-1.1.4-maintain,crobinso/libvirt,warewolf/libvirt,rlaager/libvirt,cbosdo/libvirt,emaste/libvirt,crobinso/libvirt,emaste/libvirt,nertpinx/libvirt,jeckersb/libvirt,siboulet/libvirt-openvz,dumbbell/libvirt,emaste/libvirt,VenkatDatta/libvirt,novel/fbsd-libvirt,jeckersb/libvirt,olafhering/libvirt,rmarwaha/libvirt,wiedi/libvirt,zippy2/libvirt,eskultety/libvirt,novel/fbsd-libvirt,iam-TJ/libvirt,rlaager/libvirt,taget/libvirt,olafhering/libvirt,bjzhang/libvirt,datto/libvirt,dumbbell/libvirt,taget/libvirt,novel/fbsd-libvirt,rlaager/libvirt,elmarco/libvirt,libvirt/libvirt,jardasgit/libvirt,dumbbell/libvirt,agx/libvirt,warewolf/libvirt,libvirt/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,trainstack/libvirt,novel/fbsd-libvirt,iam-TJ/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,elmarco/libvirt,emaste/libvirt,zippy2/libvirt,shugaoye/libvirt,jeckersb/libvirt,danwent/libvirt-ovs,zippy2/libvirt,agx/libvirt,danwent/libvirt-ovs,libvirt/libvirt,foomango/libvirt,shugaoye/libvirt,trainstack/libvirt,nertpinx/libvirt,bjzhang/libvirt,danwent/libvirt-ovs,emaste/libvirt,agx/libvirt,danwent/libvirt-ovs,emaste/libvirt,rmarwaha/libvirt1,trainstack/libvirt,eskultety/libvirt,rmarwaha/libvirt,andreabolognani/libvirt,elmarco/libvirt,cbosdo/libvirt,shugaoye/libvirt,dumbbell/libvirt,rmarwaha/libvirt1,fabianfreyer/libvirt,jeckersb/libvirt,wiedi/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,cbosdo/libvirt,nertpinx/libvirt,jfehlig/libvirt,elmarco/libvirt,rmarwaha/libvirt