util: netdevip: Introduce virNetDevIPAddrFree helper

This will not only help us in the future when adding more and more
VIR_AUTOPTR instances, we're also consistent in that a compound type
gets its own function which can easily be extended in the future if
necessary.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Sukrit Bhatnagar 2018-07-28 23:31:26 +05:30 committed by Erik Skultety
parent b0a8cd876c
commit 66a19eaa41
2 changed files with 7 additions and 0 deletions

View File

@ -1129,3 +1129,9 @@ virNetDevIPInfoAddToDev(const char *ifname,
cleanup:
return ret;
}
void
virNetDevIPAddrFree(virNetDevIPAddrPtr ip)
{
VIR_FREE(ip);
}

View File

@ -84,6 +84,7 @@ int virNetDevIPAddrGet(const char *ifname, virSocketAddrPtr addr)
int virNetDevIPWaitDadFinish(virSocketAddrPtr *addrs, size_t count)
ATTRIBUTE_NONNULL(1);
bool virNetDevIPCheckIPv6Forwarding(void);
void virNetDevIPAddrFree(virNetDevIPAddrPtr ip);
/* virNetDevIPRoute object */
void virNetDevIPRouteFree(virNetDevIPRoutePtr def);