mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 10:18:00 +02:00
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:
parent
94bcecdb14
commit
5a0d3c724d
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue