mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-12 20:30:34 +01:00
core: fix freeing pending activations in dispose() of device
activate_data_free() deletes the data from priv->pending_activation_checks,
thus iterating over the list with g_slist_free_full() causes a double
free or invalid memory access.
This bug does not hit easily, because the policy only get's disposed
when NM shuts down and then there are likely no pending activations
queued.
Fixes regression introduced by commit 4f0c70e945.
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
3c211760c5
commit
58500b3b8b
1 changed files with 2 additions and 2 deletions
|
|
@ -2165,8 +2165,8 @@ dispose (GObject *object)
|
|||
g_clear_object (&priv->lookup_addr);
|
||||
g_clear_object (&priv->resolver);
|
||||
|
||||
g_slist_free_full (priv->pending_activation_checks, (GDestroyNotify) activate_data_free);
|
||||
priv->pending_activation_checks = NULL;
|
||||
while (priv->pending_activation_checks)
|
||||
activate_data_free (priv->pending_activation_checks->data);
|
||||
|
||||
g_slist_free_full (priv->pending_secondaries, (GDestroyNotify) pending_secondary_data_free);
|
||||
priv->pending_secondaries = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue