mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 13:38:43 +02:00
cli: fix cleanup after activation from editor
progress_activation_editor_cb() is called multiple times every 120
milliseconds and it must free resources only the last time.
Fixes: f0a2686545
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/51
This commit is contained in:
parent
17a942b458
commit
d091cbdc2f
1 changed files with 6 additions and 4 deletions
|
|
@ -6616,8 +6616,8 @@ static gboolean
|
||||||
progress_activation_editor_cb (gpointer user_data)
|
progress_activation_editor_cb (gpointer user_data)
|
||||||
{
|
{
|
||||||
MonitorACInfo *info = (MonitorACInfo *) user_data;
|
MonitorACInfo *info = (MonitorACInfo *) user_data;
|
||||||
gs_unref_object NMDevice *device = info->device;
|
NMDevice *device = info->device;
|
||||||
gs_unref_object NMActiveConnection *ac = info->ac;
|
NMActiveConnection *ac = info->ac;
|
||||||
NMActiveConnectionState ac_state;
|
NMActiveConnectionState ac_state;
|
||||||
NMDeviceState dev_state;
|
NMDeviceState dev_state;
|
||||||
|
|
||||||
|
|
@ -6650,11 +6650,13 @@ progress_activation_editor_cb (gpointer user_data)
|
||||||
nm_object_get_path (NM_OBJECT (connection)));
|
nm_object_get_path (NM_OBJECT (connection)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return G_SOURCE_CONTINUE;
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
|
nm_g_object_unref (device);
|
||||||
|
nm_g_object_unref (ac);
|
||||||
info->monitor_id = 0;
|
info->monitor_id = 0;
|
||||||
return FALSE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue