virnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too

We are freeing the individual strings (which were filled by
virNetDevIPCheckIPv6ForwardingCallback()) but not the array
itself.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Michal Privoznik 2018-08-13 11:16:06 +02:00
parent e634c7cd0d
commit e101960761

View File

@ -651,8 +651,7 @@ virNetDevIPCheckIPv6Forwarding(void)
cleanup:
nlmsg_free(nlmsg);
for (i = 0; i < data.ndevices; i++)
VIR_FREE(data.devices[i]);
virStringListFreeCount(data.devices, data.ndevices);
return valid;
}