mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
0e502466ac
commit
21160a7ac9
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user