diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-18 15:56:03 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-10-22 19:22:59 +0200 |
commit | 5a0d3c724d16a9c51bb62bf0a117549022a32646 (patch) | |
tree | 5842eb2cef1ea55833980bd7ffa31bf1b14f4ec5 | |
parent | 94bcecdb1461ef9fa1200371b1f2da02bcc461a0 (diff) | |
download | NetworkManager-5a0d3c724d16a9c51bb62bf0a117549022a32646.tar.gz |
libnm-glib: fix use proper unref function in libnm-glib/nm-ip4-config.c
NMIP4Address and NMIP4Route instances must be released
with a special nm_ip4_*_unref function.
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | libnm-glib/nm-ip4-config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libnm-glib/nm-ip4-config.c b/libnm-glib/nm-ip4-config.c index e657ed1f91..0fc3a1fd86 100644 --- a/libnm-glib/nm-ip4-config.c +++ b/libnm-glib/nm-ip4-config.c @@ -108,7 +108,7 @@ demarshal_ip4_routes_array (NMObject *object, GParamSpec *pspec, GValue *value, { NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (object); - g_slist_foreach (priv->routes, (GFunc) g_free, NULL); + g_slist_foreach (priv->routes, (GFunc) nm_ip4_route_unref, NULL); g_slist_free (priv->routes); priv->routes = NULL; @@ -156,10 +156,10 @@ finalize (GObject *object) g_free (priv->gateway); - g_slist_foreach (priv->addresses, (GFunc) g_free, NULL); + g_slist_foreach (priv->addresses, (GFunc) nm_ip4_address_unref, NULL); g_slist_free (priv->addresses); - g_slist_foreach (priv->routes, (GFunc) g_free, NULL); + g_slist_foreach (priv->routes, (GFunc) nm_ip4_route_unref, NULL); g_slist_free (priv->routes); if (priv->nameservers) |