Define a free function for virNetDevIPAddrPtr type for consistency
and extensibility.
Signed-off-by: Sukrit Bhatnagar <skrtbhtngr(a)gmail.com>
---
src/util/virnetdevip.c | 6 ++++++
src/util/virnetdevip.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
index bf98ed8..7197d07 100644
--- a/src/util/virnetdevip.c
+++ b/src/util/virnetdevip.c
@@ -1129,3 +1129,9 @@ virNetDevIPInfoAddToDev(const char *ifname,
cleanup:
return ret;
}
+
+void
+virNetDevIPAddrFree(virNetDevIPAddrPtr ip)
+{
+ VIR_FREE(ip);
+}
diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h
index 6b509ea..dfc978d 100644
--- a/src/util/virnetdevip.h
+++ b/src/util/virnetdevip.h
@@ -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);
--
1.8.3.1