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>
This commit is contained in:
Thomas Haller 2013-10-18 15:56:03 +02:00
parent 94bcecdb14
commit 5a0d3c724d

View file

@ -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)