mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
lxcNetworkParseDataIPs: Automatically free string list
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
30b6be3f8c
commit
bd83527521
@ -548,7 +548,7 @@ lxcNetworkParseDataIPs(const char *name,
|
||||
lxcNetworkParseData *parseData)
|
||||
{
|
||||
int family = AF_INET;
|
||||
char **ipparts = NULL;
|
||||
g_auto(GStrv) ipparts = NULL;
|
||||
g_autofree virNetDevIPAddr *ip = g_new0(virNetDevIPAddr, 1);
|
||||
|
||||
if (STREQ(name, "ipv6") || STREQ(name, "ipv6.address"))
|
||||
@ -561,13 +561,9 @@ lxcNetworkParseDataIPs(const char *name,
|
||||
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Invalid CIDR address: '%s'"), value->str);
|
||||
|
||||
g_strfreev(ipparts);
|
||||
return -1;
|
||||
}
|
||||
|
||||
g_strfreev(ipparts);
|
||||
|
||||
VIR_APPEND_ELEMENT(parseData->ips, parseData->nips, ip);
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user