diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-10-08 21:43:18 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-10-09 09:58:27 +0200 |
commit | d091cbdc2fb2c953da226b92c461ae3ede2cece0 (patch) | |
tree | 7304139961ba1ea6a18ae70c84b1563cfd4be49f /clients | |
parent | 17a942b458d9467046dfc1ad8a3914aa2f9163a4 (diff) | |
download | NetworkManager-d091cbdc2fb2c953da226b92c461ae3ede2cece0.tar.gz |
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: f0a26865458a42dd35975efd9bf6fdd2d9445c08
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/51
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cli/connections.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index eb18350efa..11d88bbef6 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -6616,8 +6616,8 @@ static gboolean progress_activation_editor_cb (gpointer user_data) { MonitorACInfo *info = (MonitorACInfo *) user_data; - gs_unref_object NMDevice *device = info->device; - gs_unref_object NMActiveConnection *ac = info->ac; + NMDevice *device = info->device; + NMActiveConnection *ac = info->ac; NMActiveConnectionState ac_state; NMDeviceState dev_state; @@ -6650,11 +6650,13 @@ progress_activation_editor_cb (gpointer user_data) nm_object_get_path (NM_OBJECT (connection))); } - return TRUE; + return G_SOURCE_CONTINUE; finish: + nm_g_object_unref (device); + nm_g_object_unref (ac); info->monitor_id = 0; - return FALSE; + return G_SOURCE_REMOVE; } static void |