mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 11:19:16 +02:00
libnm: fix memleak for config in NMSettingTeamPort
(cherry picked from commit 8cb6d70e5b)
This commit is contained in:
parent
f5f3ac6537
commit
88855bbbeb
2 changed files with 24 additions and 0 deletions
|
|
@ -130,6 +130,7 @@ set_property (GObject *object, guint prop_id,
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_CONFIG:
|
case PROP_CONFIG:
|
||||||
|
g_free (priv->config);
|
||||||
priv->config = g_value_dup_string (value);
|
priv->config = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -154,6 +155,16 @@ get_property (GObject *object, guint prop_id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
finalize (GObject *object)
|
||||||
|
{
|
||||||
|
NMSettingTeamPortPrivate *priv = NM_SETTING_TEAM_PORT_GET_PRIVATE (object);
|
||||||
|
|
||||||
|
g_free (priv->config);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (nm_setting_team_port_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_setting_team_port_class_init (NMSettingTeamPortClass *setting_class)
|
nm_setting_team_port_class_init (NMSettingTeamPortClass *setting_class)
|
||||||
{
|
{
|
||||||
|
|
@ -165,6 +176,7 @@ nm_setting_team_port_class_init (NMSettingTeamPortClass *setting_class)
|
||||||
/* virtual methods */
|
/* virtual methods */
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
|
object_class->finalize = finalize;
|
||||||
parent_class->verify = verify;
|
parent_class->verify = verify;
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ set_property (GObject *object, guint prop_id,
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_CONFIG:
|
case PROP_CONFIG:
|
||||||
|
g_free (priv->config);
|
||||||
priv->config = g_value_dup_string (value);
|
priv->config = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -154,6 +155,16 @@ get_property (GObject *object, guint prop_id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
finalize (GObject *object)
|
||||||
|
{
|
||||||
|
NMSettingTeamPortPrivate *priv = NM_SETTING_TEAM_PORT_GET_PRIVATE (object);
|
||||||
|
|
||||||
|
g_free (priv->config);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (nm_setting_team_port_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_setting_team_port_class_init (NMSettingTeamPortClass *setting_class)
|
nm_setting_team_port_class_init (NMSettingTeamPortClass *setting_class)
|
||||||
{
|
{
|
||||||
|
|
@ -165,6 +176,7 @@ nm_setting_team_port_class_init (NMSettingTeamPortClass *setting_class)
|
||||||
/* virtual methods */
|
/* virtual methods */
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
|
object_class->finalize = finalize;
|
||||||
parent_class->verify = verify;
|
parent_class->verify = verify;
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue