mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
virDomainDefParseXML: set the argument of virBitmapFree to NULL after calling virBitmapFree
After freeing the bitmap pointer, it must set the pointer to NULL.
This will avoid any other use of the freed memory of the bitmap pointer.
https://bugzilla.redhat.com/show_bug.cgi?id=1006710
Signed-off-by: Liuji (Jeremy) <jeremy.liu@huawei.com>
(cherry picked from commit ef5d51d491
)
This commit is contained in:
parent
c3663c47c1
commit
0d79af2e5e
@ -10964,8 +10964,10 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
}
|
||||
|
||||
/* Ignore 'nodeset' if 'placement' is 'auto' finally */
|
||||
if (placement_mode == VIR_NUMA_TUNE_MEM_PLACEMENT_MODE_AUTO)
|
||||
if (placement_mode == VIR_NUMA_TUNE_MEM_PLACEMENT_MODE_AUTO) {
|
||||
virBitmapFree(def->numatune.memory.nodemask);
|
||||
def->numatune.memory.nodemask = NULL;
|
||||
}
|
||||
|
||||
/* Copy 'placement' of <numatune> to <vcpu> if its 'placement'
|
||||
* is not specified and 'placement' of <numatune> is specified.
|
||||
|
Loading…
Reference in New Issue
Block a user