提交 21160a7a 编写于 作者: J John Ferlan

openvz: Resolve Coverity RESOURCE_LEAK

Commit id 'a4e86390' modified the command line to allow --ipadd multiple
times, which caused Coverity to notice a latent memory leak with the
'ipAddr' string not being VIR_FREE()'d
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 0e502466
......@@ -911,6 +911,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
for (i = 0; i < net->nips; i++) {
char *ipStr = virSocketAddrFormat(&net->ips[i]->address);
virCommandAddArgList(cmd, "--ipadd", ipStr, NULL);
VIR_FREE(ipStr);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册