提交 8def3215 编写于 作者: J Jiri Denemark

conf: Avoid leaking blockers from virDomainCapsCPUModel

When adding CPU usability blockers I forgot to properly free them when
in virDomainCapsCPUModelsDispose.
Reported-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 3080834f
......@@ -94,8 +94,10 @@ virDomainCapsCPUModelsDispose(void *obj)
virDomainCapsCPUModelsPtr cpuModels = obj;
size_t i;
for (i = 0; i < cpuModels->nmodels; i++)
for (i = 0; i < cpuModels->nmodels; i++) {
VIR_FREE(cpuModels->models[i].name);
virStringListFree(cpuModels->models[i].blockers);
}
VIR_FREE(cpuModels->models);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册