xenconfig: avoid double free on OOM testing
xenconfig: avoid double free on OOM testing

Fix xlconfig channel tests when OOM testing is enabled.

TEST: xlconfigtest
32) Xen XL-2-XML Format channel-unix                                  ... OK
    Test OOM for nalloc=55 ................................................*** Error in `/home/jfehlig/virt/upstream/libvirt/tests/.libs/xlconfigtest': double free or corruption (fasttop): 0x0000000000679550 ***
...
(gdb) bt
#0  0x00007ffff36875af in raise () from /lib64/libc.so.6
#1  0x00007ffff36889aa in abort () from /lib64/libc.so.6
#2  0x00007ffff36c5150 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff36cb4f6 in malloc_printerr () from /lib64/libc.so.6
#4  0x00007ffff36cbcee in _int_free () from /lib64/libc.so.6
#5  0x00007ffff782babf in virFree (ptrptr=0x7fffffffdca8) at util/viralloc.c:582
#6  0x000000000042f2f3 in xenParseXLChannel (conf=0x677350, def=0x6815b0) at xenconfig/xen_xl.c:788
#7  0x000000000042f44e in xenParseXL (conf=0x677350, caps=0x6832b0, xmlopt=0x67f6e0) at xenconfig/xen_xl.c:828
#8  0x00000000004105a3 in testCompareFormatXML (
    xlcfg=0x6811e0 "/home/jfehlig/virt/upstream/libvirt/tests/xlconfigdata/test-channel-unix.cfg",
    xml=0x681110 "/home/jfehlig/virt/upstream/libvirt/tests/xlconfigdata/test-channel-unix.xml", replaceVars=false)
    at xlconfigtest.c:152

When a channel is successfully parsed and its path and name fields
assigned from local variables, set the local variables to NULL to
prevent a double free on error.

Signed-off-by: Jim Fehlig <39929b5b86d72d51fceac59b52303e3fe8a3083e@suse.com>

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