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: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2015-01-09 07:38:17 -05:00
parent 0e502466ac
commit 21160a7ac9
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}
}