summary refs log tree commit diff
path: root/src/devices
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-09-06 09:25:17 +0200
committerMichael Biebl <biebl@debian.org>2019-09-06 09:25:17 +0200
commit555dfa331e295a3a687a7cc6870e1349ffed8f26 (patch)
treeaebc4e1ffa38b05780f0c1fe39bf78ca63c979c6 /src/devices
parent5c79b900b59a5ad162ecc836e424468207ff031e (diff)
New upstream version 1.20.2 upstream/1.20.2
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/bluetooth/nm-bluez5-manager.c4
-rw-r--r--src/devices/nm-acd-manager.c2
-rw-r--r--src/devices/nm-device.c7
3 files changed, 9 insertions, 4 deletions
diff --git a/src/devices/bluetooth/nm-bluez5-manager.c b/src/devices/bluetooth/nm-bluez5-manager.c
index 7bcd04e5..9c5e8644 100644
--- a/src/devices/bluetooth/nm-bluez5-manager.c
+++ b/src/devices/bluetooth/nm-bluez5-manager.c
@@ -404,6 +404,7 @@ get_managed_objects_cb (GDBusProxy *proxy,
                         GAsyncResult *res,
                         NMBluez5Manager *self)
 {
+	gs_unref_variant GVariant *variant0 = NULL;
 	GVariant *variant, *ifaces;
 	GVariantIter i;
 	GError *error = NULL;
@@ -422,7 +423,8 @@ get_managed_objects_cb (GDBusProxy *proxy,
 		g_clear_error (&error);
 		return;
 	}
-	g_variant_iter_init (&i, g_variant_get_child_value (variant, 0));
+	variant0 = g_variant_get_child_value (variant, 0);
+	g_variant_iter_init (&i, variant0);
 	while ((g_variant_iter_next (&i, "{&o*}", &path, &ifaces))) {
 		object_manager_interfaces_added (proxy, path, ifaces, self);
 		g_variant_unref (ifaces);
diff --git a/src/devices/nm-acd-manager.c b/src/devices/nm-acd-manager.c
index 16d3df8a..aca7ffd2 100644
--- a/src/devices/nm-acd-manager.c
+++ b/src/devices/nm-acd-manager.c
@@ -174,7 +174,6 @@ acd_event (GIOChannel *source, GIOCondition condition, gpointer data)
 	AddressInfo *info;
 	gboolean emit_probe_terminated = FALSE;
 	char address_str[INET_ADDRSTRLEN];
-	gs_free char *hwaddr_str = NULL;
 	int r;
 
 	if (n_acd_dispatch (self->acd))
@@ -182,6 +181,7 @@ acd_event (GIOChannel *source, GIOCondition condition, gpointer data)
 
 	while (   !n_acd_pop_event (self->acd, &event)
 	       && event) {
+		gs_free char *hwaddr_str = NULL;
 		gboolean check_probing_done = FALSE;
 
 		switch (event->event) {
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index f07c4f09..823cf48a 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -4151,11 +4151,12 @@ nm_device_create_and_realize (NMDevice *self,
 	nm_auto_nmpobj const NMPObject *plink_keep_alive = NULL;
 	NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
 	const NMPlatformLink *plink;
+	gboolean nm_owned;
 
 	/* Must be set before device is realized */
 	plink = nm_platform_link_get_by_ifname (nm_device_get_platform (self), priv->iface);
-	priv->nm_owned = !plink || !link_type_compatible (self, plink->type, NULL, NULL);
-	_LOGD (LOGD_DEVICE, "create (is %snm-owned)", priv->nm_owned ? "" : "not ");
+	nm_owned = !plink || !link_type_compatible (self, plink->type, NULL, NULL);
+	_LOGD (LOGD_DEVICE, "create (is %snm-owned)", nm_owned ? "" : "not ");
 
 	plink = NULL;
 	/* Create any resources the device needs */
@@ -4168,6 +4169,8 @@ nm_device_create_and_realize (NMDevice *self,
 		}
 	}
 
+	priv->nm_owned = nm_owned;
+
 	realize_start_setup (self,
 	                     plink,
 	                     FALSE, /* assume_state_guess_assume */