提交 71f7d584 编写于 作者: G Gao feng

qemu: remove memset params array to zero in qemuDomainGetPercpuStats

the array params is allocated by VIR_ALLOC_N in
remoteDispatchDomainGetCPUStats. it had been set
to zero. No need to reset it to zero again, and
this reset here is incorrect too, nparams * ncpus
is the array length not the size of params array.
Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
上级 119eb4a1
......@@ -15881,7 +15881,6 @@ qemuDomainGetPercpuStats(virDomainObjPtr vm,
if (virCgroupGetCpuacctPercpuUsage(priv->cgroup, &buf))
goto cleanup;
pos = buf;
memset(params, 0, nparams * ncpus);
/* return percpu cputime in index 0 */
param_idx = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册