diff options
author | Thomas Haller <thaller@redhat.com> | 2022-12-06 14:57:50 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-12-09 12:46:02 +0100 |
commit | ed47047a36349a21a6d0d47ba38b385ac27d8b8d (patch) | |
tree | a1157efee019317dea3403b2f42b86359a9f0951 | |
parent | e4cc504af53b1996cd76ebb3ddcd35b492f8620b (diff) |
device: use correct field "l3cfg_" to clear in dispose()
The fields "l3cfg" and "l3cfg_" are union aliases. One of them is const,
the other is not. The idea is that all places that modify the field need
to use the special name "l3cfg_", and grepping for that will lead you to
all the relevant places.
This mistake happened, because g_clear_object() casts constness away.
Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration')
(cherry picked from commit 8cb739031d0f129dca2dbefaf0bc38ca33216901)
-rw-r--r-- | src/core/devices/nm-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 684a72d728..2f800d0d28 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -17841,7 +17841,7 @@ dispose(GObject *object) priv->sriov.next = NULL; } - g_clear_object(&priv->l3cfg); + g_clear_object(&priv->l3cfg_); g_clear_object(&priv->l3ipdata_4.ip_config); g_clear_object(&priv->l3ipdata_6.ip_config); |