From 394f6281eadbca5cf51386be854bb73086cadc09 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sun, 13 Jul 2025 18:12:58 +0200 Subject: [PATCH 1/3] platform: fix GError free function Fixes: dd7810c473c9 ('platform: destroy VFs before changing the eswitch mode') --- src/libnm-platform/nm-linux-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index f796e53dfb..c7c78265c6 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -9249,7 +9249,7 @@ sriov_async_finish_err(SriovAsyncState *async_state, GError *error) g_object_unref(async_state->platform); g_object_unref(async_state->cancellable); g_free(async_state); - g_free(error); + nm_g_error_free(error); } static void From 012f1cbfacf1bac9fd9888b68ee48adbae9e7085 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 18 Jul 2025 09:02:52 +0200 Subject: [PATCH 2/3] device: fix signal emission on port detach/release The "notify::controller" signal must be emitted on the port, not on the controller. Fixes: 1f05526ed77e ('core: drop NMDevice master and introduce controller') --- src/core/devices/nm-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index fd0eb7dba6..198e75ec70 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -9029,7 +9029,7 @@ nm_device_port_notify_attach_as_port(NMDevice *self, gboolean success) priv->is_attached = TRUE; - _notify(priv->controller, PROP_CONTROLLER); + _notify(self, PROP_CONTROLLER); nm_clear_pointer(&NM_DEVICE_GET_PRIVATE(priv->controller)->ports_variant, g_variant_unref); @@ -9108,7 +9108,7 @@ nm_device_port_notify_release(NMDevice *self, priv->is_attached = FALSE; - _notify(priv->controller, PROP_CONTROLLER); + _notify(self, PROP_CONTROLLER); nm_clear_pointer(&NM_DEVICE_GET_PRIVATE(priv->controller)->ports_variant, g_variant_unref); nm_gobject_notify_together(priv->controller, PROP_PORTS, PROP_SLAVES); From ec996135a93bc58c199d703f40a4e0b7f658a070 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 18 Jul 2025 09:25:28 +0200 Subject: [PATCH 3/3] device: fix comment in attach_port() --- src/core/devices/nm-device-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/devices/nm-device-bridge.c b/src/core/devices/nm-device-bridge.c index 45cdd83f07..6ca3737f9d 100644 --- a/src/core/devices/nm-device-bridge.c +++ b/src/core/devices/nm-device-bridge.c @@ -1066,7 +1066,7 @@ attach_port(NMDevice *device, plat_vlans = setting_vlans_to_platform(vlans, &num_vlans); - /* Since the link was just enportd, there are no existing VLANs + /* Since the link was just attached, there are no existing VLANs * (except for the default one) and so there's no need to flush. */ if (plat_vlans