summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-01-25 21:38:27 +0100
committerThomas Haller <thaller@redhat.com>2022-01-25 21:40:38 +0100
commit62b2aa85e875d9c842f878cac896dd1fa7c5d988 (patch)
tree7d70e4a043b7b7ff313c8b1cf672c2ddfbb23244
parenta2d2ea6ea6a1b779799fbf030038663ccd4eec2c (diff)
Revert "libnm: fix dangling pointer in public API while destructing NMClient"
This breaks test @nmcli_monitor. With this patch, `nmcli monitor` no longer prints "There's no primary connection". Need to investigate why. For now, revert the patch. This reverts commit 2afecaf908401296a2642fdd1d73a76b9c3fa11a.
-rw-r--r--src/libnm-client-impl/nm-client.c1
-rw-r--r--src/libnm-client-impl/tests/test-nm-client.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libnm-client-impl/nm-client.c b/src/libnm-client-impl/nm-client.c
index a2797f905a..27382ec8b9 100644
--- a/src/libnm-client-impl/nm-client.c
+++ b/src/libnm-client-impl/nm-client.c
@@ -1799,7 +1799,6 @@ nml_dbus_property_o_notify(NMClient *self,
if (pr_o->obj_watcher
&& (!dbus_path || !nm_streq(dbus_path, pr_o->obj_watcher->dbobj->dbus_path->str))) {
- pr_o->nmobj = NULL;
_dbobjs_obj_watcher_unregister(self, g_steal_pointer(&pr_o->obj_watcher));
changed = TRUE;
}
diff --git a/src/libnm-client-impl/tests/test-nm-client.c b/src/libnm-client-impl/tests/test-nm-client.c
index a43e98cd18..4841c96865 100644
--- a/src/libnm-client-impl/tests/test-nm-client.c
+++ b/src/libnm-client-impl/tests/test-nm-client.c
@@ -812,7 +812,7 @@ _dev_eth0_1_state_changed_cb(NMDevice *device,
g_assert(arr);
g_assert_cmpint(arr->len, ==, 0);
- g_assert(!nm_device_get_active_connection(device));
+ // g_assert(!nm_device_get_active_connection(device));
}
static void
@@ -921,7 +921,7 @@ test_activate_virtual(void)
g_assert(arr);
g_assert_cmpint(arr->len, ==, 0);
- g_assert(!nm_device_get_active_connection(dev_eth0_1));
+ // g_assert(!nm_device_get_active_connection(dev_eth0_1));
nm_clear_g_signal_handler(dev_eth0_1, &sig_id);