qemu_cgroup: initialize mem_mask to NULL

If 'virNumaGetHostNodeset()' fails then the error path will try to free
uninitialized pointer mem_mask. Introduced by commit af2a1f058.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 77a9dc0b8d)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2015-02-17 14:08:22 +01:00
parent 0e1054a129
commit 5e7b535238

View File

@ -789,7 +789,7 @@ qemuInitCgroup(virQEMUDriverPtr driver,
static void
qemuRestoreCgroupState(virDomainObjPtr vm)
{
char *mem_mask;
char *mem_mask = NULL;
int empty = -1;
qemuDomainObjPrivatePtr priv = vm->privateData;
virBitmapPtr all_nodes;