diff options
author | Milan Crha <mcrha@redhat.com> | 2011-12-14 20:08:16 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-12-14 20:08:16 +0800 |
commit | 10ee75dfdfd41fc35e6307619e891915b6f3cafe (patch) | |
tree | 1beeb93f185e0bbc3a5ebc24d5f8d912cbfd337a | |
parent | 737ad1158fd44e7f8e9231b20ed83bae44c41609 (diff) | |
download | gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.tar gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.tar.gz gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.tar.bz2 gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.tar.lz gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.tar.xz gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.tar.zst gsoc2013-evolution-10ee75dfdfd41fc35e6307619e891915b6f3cafe.zip |
Fix leaks around categories editing
Requires commit 768ca76 in evolution-data-server
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 5 | ||||
-rw-r--r-- | e-util/e-categories-config.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 6f4597ab1f..d1494ff366 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -3223,7 +3223,7 @@ categories_response (GtkDialog *dialog, gint response, EContactEditor *editor) { - const gchar *categories; + gchar *categories; GtkWidget *entry; entry = e_builder_get_widget (editor->builder, "entry-categories"); @@ -3238,7 +3238,8 @@ categories_response (GtkDialog *dialog, e_contact_set ( editor->contact, E_CONTACT_CATEGORIES, - (gchar *) categories); + categories); + g_free (categories); } gtk_widget_destroy (GTK_WIDGET (dialog)); diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c index 5ca20f8e74..9beeb92df2 100644 --- a/e-util/e-categories-config.c +++ b/e-util/e-categories-config.c @@ -130,8 +130,11 @@ e_categories_config_open_dialog_for_entry (GtkEntry *entry) result = gtk_dialog_run (dialog); if (result == GTK_RESPONSE_OK) { - text = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog)); - gtk_entry_set_text (GTK_ENTRY (entry), text); + gchar *categories; + + categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog)); + gtk_entry_set_text (GTK_ENTRY (entry), categories); + g_free (categories); } gtk_widget_destroy (GTK_WIDGET (dialog)); |