From: Liuji (Jeremy) Date: Wed, 11 Sep 2013 02:13:32 +0000 (-0400) Subject: virDomainDefParseXML: set the argument of virBitmapFree to NULL after calling virBitm... X-Git-Tag: CVE-2013-4311~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef5d51d;p=thirdparty%2Flibvirt.git 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) --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index aed2a9dbcc..108f092913 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11305,8 +11305,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 to if its 'placement' * is not specified and 'placement' of is specified.