libnm: drop unnecessary cleanup of direct strv properties

Direct properties are automatically cleaned up by the base class
(_finalize_direct()). No need to duplicate that. The point of
the direct property implementation is to free us from this repeated
cumbersome steps (and forgetting this step without a direct property
would not be only unnecessary, but erroneous).
This commit is contained in:
Thomas Haller 2023-10-25 13:40:53 +02:00
parent 2dd5b065a8
commit 43febd92ff
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 0 additions and 15 deletions

View file

@ -1796,7 +1796,6 @@ finalize(GObject *object)
NMSettingConnectionPrivate *priv = NM_SETTING_CONNECTION_GET_PRIVATE(object);
nm_clear_pointer(&priv->permissions, g_array_unref);
nm_clear_pointer(&priv->secondaries.arr, g_array_unref);
G_OBJECT_CLASS(nm_setting_connection_parent_class)->finalize(object);
}

View file

@ -718,19 +718,6 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
return TRUE;
}
static void
finalize(GObject *object)
{
NMSettingMatch *self = NM_SETTING_MATCH(object);
nm_clear_pointer(&self->interface_name.arr, g_array_unref);
nm_clear_pointer(&self->kernel_command_line.arr, g_array_unref);
nm_clear_pointer(&self->driver.arr, g_array_unref);
nm_clear_pointer(&self->path.arr, g_array_unref);
G_OBJECT_CLASS(nm_setting_match_parent_class)->finalize(object);
}
static void
nm_setting_match_class_init(NMSettingMatchClass *klass)
{
@ -740,7 +727,6 @@ nm_setting_match_class_init(NMSettingMatchClass *klass)
object_class->get_property = _nm_setting_property_get_property_direct;
object_class->set_property = _nm_setting_property_set_property_direct;
object_class->finalize = finalize;
setting_class->verify = verify;