cli: fix cleanup after activation from editor (rh #1662766)
https://bugzilla.redhat.com/show_bug.cgi?id=1662766
This commit is contained in:
parent
749719ef1a
commit
3b04eccd44
|
@ -0,0 +1,52 @@
|
|||
From 0c581081fa18aa412885a700b6d5fc017a53a463 Mon Sep 17 00:00:00 2001
|
||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
||||
Date: Mon, 8 Oct 2018 21:43:18 +0200
|
||||
Subject: [PATCH 2/2] 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
|
||||
(cherry picked from commit d091cbdc2fb2c953da226b92c461ae3ede2cece0)
|
||||
(cherry picked from commit fd3658e25f5c18d9d53d3f580cfce68ed416848b)
|
||||
(cherry picked from commit 09d8eca1c26fe96731182df096804e8421dbdd7c)
|
||||
---
|
||||
clients/cli/connections.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
|
||||
index b547e34ca..f6066b87d 100644
|
||||
--- a/clients/cli/connections.c
|
||||
+++ b/clients/cli/connections.c
|
||||
@@ -6523,8 +6523,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;
|
||||
|
||||
@@ -6557,11 +6557,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
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
%global epoch_version 1
|
||||
%global rpm_version 1.12.6
|
||||
%global real_version 1.12.6
|
||||
%global release_version 3
|
||||
%global release_version 4
|
||||
%global snapshot %{nil}
|
||||
%global git_sha %{nil}
|
||||
|
||||
|
@ -114,6 +114,7 @@ Patch2: 0002-man-add-missing-connection-defaults.patch
|
|||
Patch3: 0003-wifi-take-down-device-when-changing-mac.patch
|
||||
Patch4: 0004-connectivity-check-rh1619873.patch
|
||||
Patch5: 0005-fix-saving-agent-owned-secrets.patch
|
||||
Patch6: 0006-cli-fix-cleanup-after-activation-from-editor.patch
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(post): /usr/sbin/update-alternatives
|
||||
|
@ -445,6 +446,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
%if %{with regen_docs}
|
||||
|
@ -861,8 +863,9 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 2 2019 Beniamino Galvani <bgalvani@redhat.com> -
|
||||
* Wed Jan 2 2019 Beniamino Galvani <bgalvani@redhat.com> - 1:1.12.6-4
|
||||
- fix saving agent-owned secrets
|
||||
- cli: fix cleanup after activation from editor (rh #1662766)
|
||||
|
||||
* Tue Dec 11 2018 Thomas Haller <thaller@redhat.com> - 1:1.12.6-3
|
||||
- connectivity: fix portal detection with multiple devices (rh #1619873)
|
||||
|
|
Loading…
Reference in New Issue