virCgroupValidateMachineGroup: Don't free @machinename
virCgroupValidateMachineGroup: Don't free @machinename

We are given a string in @machinename, we never allocate it, just
merely use it for reading. We should not free it otherwise it
leads to double free:

==32191== Thread 17:
==32191== Invalid free() / delete / delete[] / realloc()
==32191==    at 0x4C2D1A0: free (vg_replace_malloc.c:530)
==32191==    by 0x54BBB84: virFree (viralloc.c:582)
==32191==    by 0x2BC04499: qemuProcessStop (qemu_process.c:6313)
==32191==    by 0x2BC500FF: processMonitorEOFEvent (qemu_driver.c:4724)
==32191==    by 0x2BC502FC: qemuProcessEventHandler (qemu_driver.c:4769)
==32191==    by 0x5550640: virThreadPoolWorker (virthreadpool.c:167)
==32191==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==32191==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)
==32191==    by 0x928DE3C: clone (in /lib64/libc-2.23.so)
==32191==  Address 0x31893d70 is 0 bytes inside a block of size 1,100 free'd
==32191==    at 0x4C2D1A0: free (vg_replace_malloc.c:530)
==32191==    by 0x54BBB84: virFree (viralloc.c:582)
==32191==    by 0x54C1936: virCgroupValidateMachineGroup (vircgroup.c:343)
==32191==    by 0x54C4B29: virCgroupNewDetectMachine (vircgroup.c:1550)
==32191==    by 0x2BBDDA29: qemuConnectCgroup (qemu_cgroup.c:972)
==32191==    by 0x2BC05DA7: qemuProcessReconnect (qemu_process.c:6822)
==32191==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==32191==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)
==32191==    by 0x928DE3C: clone (in /lib64/libc-2.23.so)
==32191==  Block was alloc'd at
==32191==    at 0x4C2BE80: malloc (vg_replace_malloc.c:298)
==32191==    by 0x4C2E35F: realloc (vg_replace_malloc.c:785)
==32191==    by 0x54BB492: virReallocN (viralloc.c:245)
==32191==    by 0x54BEDF2: virBufferGrow (virbuffer.c:150)
==32191==    by 0x54BF3B9: virBufferVasprintf (virbuffer.c:408)
==32191==    by 0x54BF324: virBufferAsprintf (virbuffer.c:381)
==32191==    by 0x55BB271: virDomainGenerateMachineName (domain_conf.c:27078)
==32191==    by 0x2BBD5B8F: qemuDomainGetMachineName (qemu_domain.c:9595)
==32191==    by 0x2BBDD9B4: qemuConnectCgroup (qemu_cgroup.c:966)
==32191==    by 0x2BC05DA7: qemuProcessReconnect (qemu_process.c:6822)
==32191==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==32191==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)

Moreover, make the @machinename 'const char *' to mark it
explicitly that we are not changing the passed string.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

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