diff options
author | Thomas Haller <thaller@redhat.com> | 2015-09-11 12:29:32 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-09-12 12:52:00 +0200 |
commit | 5e4d2b523f1412a44daccced865f16c7b581913f (patch) | |
tree | 264c6050a0279b19340f96dafd3ac086c96e8b9c | |
parent | b6dcbd0f05f7a0f4345f118a36c4550d0e1a5abd (diff) | |
download | network-manager-applet-5e4d2b523f1412a44daccced865f16c7b581913f.tar.gz |
libnma: copy the password_flags_name string for PopupMenuItemInfo
(cherry picked from commit 1ba974dfcfd0d6e05de2fca857b9c537f5fed842)
-rw-r--r-- | src/libnm-gtk/nm-ui-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libnm-gtk/nm-ui-utils.c b/src/libnm-gtk/nm-ui-utils.c index 5185e7c2..a5d5c15c 100644 --- a/src/libnm-gtk/nm-ui-utils.c +++ b/src/libnm-gtk/nm-ui-utils.c @@ -724,7 +724,7 @@ menu_item_to_secret_flags (MenuItem item) typedef struct { NMSetting *setting; - const char *password_flags_name; + char *password_flags_name; MenuItem item_number; GtkWidget *passwd_entry; } PopupMenuItemInfo; @@ -736,6 +736,7 @@ popup_menu_item_info_destroy (gpointer data, GClosure *closure) if (info->setting) g_object_unref (info->setting); + g_clear_pointer (&info->password_flags_name, g_free); g_slice_free (PopupMenuItemInfo, info); } @@ -770,7 +771,7 @@ popup_menu_item_info_register (GtkWidget *item, info = g_slice_new0 (PopupMenuItemInfo); info->setting = setting ? g_object_ref (setting) : NULL; - info->password_flags_name = password_flags_name; + info->password_flags_name = g_strdup (password_flags_name); info->item_number = item_number; info->passwd_entry = passwd_entry; |