diff options
Diffstat (limited to 'libnm-core/nm-setting-dcb.c')
-rw-r--r-- | libnm-core/nm-setting-dcb.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-dcb.c b/libnm-core/nm-setting-dcb.c index a4fa00c840..915cc41f2e 100644 --- a/libnm-core/nm-setting-dcb.c +++ b/libnm-core/nm-setting-dcb.c @@ -50,7 +50,7 @@ NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_DCB) typedef struct { NMSettingDcbFlags app_fcoe_flags; gint app_fcoe_priority; - const char * app_fcoe_mode; + char * app_fcoe_mode; NMSettingDcbFlags app_iscsi_flags; gint app_iscsi_priority; @@ -793,6 +793,7 @@ set_property (GObject *object, guint prop_id, priv->app_fcoe_priority = g_value_get_int (value); break; case PROP_APP_FCOE_MODE: + g_free (priv->app_fcoe_mode); priv->app_fcoe_mode = g_value_dup_string (value); break; case PROP_APP_ISCSI_FLAGS: @@ -897,6 +898,16 @@ get_property (GObject *object, guint prop_id, } static void +finalize (GObject *object) +{ + NMSettingDcbPrivate *priv = NM_SETTING_DCB_GET_PRIVATE (object); + + g_free (priv->app_fcoe_mode); + + G_OBJECT_CLASS (nm_setting_dcb_parent_class)->finalize (object); +} + +static void nm_setting_dcb_class_init (NMSettingDcbClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); @@ -907,6 +918,7 @@ nm_setting_dcb_class_init (NMSettingDcbClass *setting_class) /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; + object_class->finalize = finalize; parent_class->verify = verify; /* Properties */ |